Appearance
Interface: WriteFileProps ​
Extends ​
Properties ​
compression? ​
optionalcompression?:boolean
Whether to DEFLATE-compress the package (PowerPoint itself always compresses; set false only if export time matters more than file size)
Default ​
ts
trueInherited from ​
fileName? ​
optionalfileName?:string
Export file name
Default ​
ts
'Presentation.pptx'onMediaError? ​
optionalonMediaError?:"placeholder"|"throw"
How to handle a media asset (image/audio/video) that fails to load during export.
'throw'(default): reject the export with an error naming the failing asset. A deck that silently embeds a broken-image placeholder is a degenerate result, so failing loudly is the safe default.'placeholder': substitute a broken-image placeholder, emit amedia/load-faileddiagnostic (seesetDiagnosticHandler), and continue. Useful for best-effort/batch jobs where one missing asset should not abort the whole deck. An OLE object's or a 3D model's payload still rejects the export: the placeholder is a picture, and written into a.xlsxor.glbpart it is a part PowerPoint cannot open.
An SVG that loads but cannot be rasterized into the PNG fallback written beside it (in a browser, one that does not decode or has no intrinsic size) is reported as media/svg-preview-failed instead, whether it was given by path or inline: the export rejects with it under 'throw', and under 'placeholder' it is warned, the SVG part keeps its bytes and only the PNG fallback is a placeholder. A runtime with no rasterizer (Node, the neutral entry) always writes that placeholder, and reports nothing.
Default ​
ts
'throw'