Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / WriteProps

Interface: WriteProps

Defined in: src/types/pres.ts:31

Extends

Properties

compression?

optional compression?: boolean

Defined in: src/types/pres.ts:17

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"

Defined in: src/types/pres.ts:29

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.

Default

ts
'throw'

Inherited from

WriteBaseProps.onMediaError


outputType?

optional outputType?: WRITE_OUTPUT_TYPE

Defined in: src/types/pres.ts:37

Output type

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

Default

ts
'blob'