Presentation Options
Metadata
Metadata Properties
These optional metadata properties correspond to built-in PowerPoint document properties (visible under File > Info). They help describe the presentation’s content and ownership.
Library Version
You can also check the current pptxgenjs library version using the read-only
versionproperty
Metadata Properties Examples
pptxgenjs uses ES6-style getters/setters.
Slide Layouts (Sizes)
Layout option applies to all slides in the current Presentation.
Slide Layout Syntax
Standard Slide Layouts
Custom Slide Layouts
Custom layouts of any size are supported.
- Use the
defineLayout()method to create a custom layout of any size - Multiple layouts are supported. For example, define both an 'A3' and an 'A4' layout, then apply whichever is required
Custom Slide Layout Example
To inspect the current layout size:
Text Direction
Text Direction Options
Right-to-Left (RTL) text is supported. Set the RTL mode presentation property to enable it.
Text Direction Examples
Notes:
- You may also need to set an RTL lang value such as
lang='he'as the default lang is 'EN-US' - See Issue#600 for more
Default Font
Default Font Options
Use the headFontFace and bodyFontFace properties to set the default font used in the presentation.
Default Font Examples
Embedded Fonts
Font embedding is opt-in. The default write path embeds nothing: no ppt/fonts/*.fntdata parts, no fntdata content type, and no Presentation font relationships.
Call addFont with a font file you are licensed to embed. This library ships no fonts. Conversion uses a vendored MIT subset of fonteditor-core; orchestration follows MIT pptx-embed-fonts.