There are several optional PowerPoint metadata properties that can be set.
PptxGenJS uses ES6-style getters/setters.
pptx.author = 'Brent Ely';
pptx.company = 'S.T.A.R. Laboratories';
pptx.revision = '15';
pptx.subject = 'Annual Report';
pptx.title = 'PptxGenJS Sample Presentation';
Layout Option applies to all the Slides in the current Presentation.
pptx.layout = 'LAYOUT_NAME';
Layout Name | Default | Layout Slide Size |
---|---|---|
LAYOUT_16x9 |
Yes | 10 x 5.625 inches |
LAYOUT_16x10 |
No | 10 x 6.25 inches |
LAYOUT_4x3 |
No | 10 x 7.5 inches |
LAYOUT_WIDE |
No | 13.3 x 7.5 inches |
Custom, user-defined layouts are supported
defineLayout()
method to create a custom layout of any size// Define new layout for the Presentation
pptx.defineLayout({ name:'A3', width:16.5, height:11.7 });
// Set presentation to use new layout
pptx.layout = 'A3'
Right-to-Left (RTL) text is supported. Simply set the RTL mode at the Presentation-level.
// Set right-to-left text mode
pptx.rtlMode = true;
Notes:
lang='he'
as the default lang is ‘EN-US’Use the headFontFace
and bodyFontFace
properties to set the default font used in the presentation.
pptx.theme = { headFontFace: "Arial Light" };
pptx.theme = { bodyFontFace: "Arial" };