Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / WriteFileProps

Interface: WriteFileProps

Defined in: core-interfaces.ts:2787

Extends

Properties

compression?

optional compression?: boolean

Defined in: core-interfaces.ts:2766

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

Default

ts
true

Since

v3.5.0 (default changed false→true in v4.0.0)

Inherited from

WriteBaseProps.compression


fileName?

optional fileName?: string

Defined in: core-interfaces.ts:2792

Export file name

Default

ts
'Presentation.pptx'

onMediaError?

optional onMediaError?: "throw" | "placeholder"

Defined in: core-interfaces.ts:2777

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 console.warn, 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