Skip to content

Interface: WriteProps ​

Extends ​

Properties ​

compression? ​

optional compression?: boolean

Whether to DEFLATE-compress the package (PowerPoint itself always compresses; set false only if export time matters more than file size)

Default ​

ts
true

Inherited from ​

WriteBaseProps.compression


onMediaError? ​

optional onMediaError?: "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 a media/load-failed diagnostic (see setDiagnosticHandler), 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 .xlsx or .glb part 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'

Inherited from ​

WriteBaseProps.onMediaError


outputType? ​

optional outputType?: "arraybuffer" | "blob" | "base64" | "binarystring" | "nodebuffer" | "uint8array"

Output type

  • values: 'arraybuffer' | 'base64' | 'binarystring' | 'blob' | 'nodebuffer' | 'uint8array'

Default ​

ts
'blob'