slides, slideMasters and the other collections. Concepts explains the model.
PowerPointPresentation
Office.js-shaped facade over a .pptx (PowerPoint.Presentation). Handles
are live element references and every edit applies at once: there is no
load()/sync() protocol. Members Office.js lacks are marked as extensions.
Import from @reductoai/pptx/officejs.
PowerPointPresentation properties
PowerPointPresentation.create()
PowerPointPresentation.fromBytes()
PowerPointPresentation.applySlideMaster()
SlideRange.Design): a master already in the deck on the given slides (all when absent).
PowerPointPresentation.applyTemplateFromBase64()
ApplyTemplate): the first master of a .pptx or .potx, with its layouts and
theme, on the given slides (all when absent). Each slide moves to the layout of its type, or of
its name for a custom one; a layout with no match is copied. A master no slide uses is dropped.
Returns the master’s id.
PowerPointPresentation.insertSlidesFromBase64()
formatting the slides keep their source master and theme.
PowerPointPresentation.toBytes()
Node additions
PowerPointPresentation.create() (node)
PowerPointPresentation.fromBytes() (node)
PowerPointPresentation.open() (node)
PowerPointPresentation.save() (node)
path; the facade never writes the source file in place.
PowerPointPresentation.toPdf() (node)
path when given.
PowerPointPresentation.toPng() (node)
pages, zero-based), from the same IR as toPdf.
ToPdfOptions
Import from @reductoai/pptx/node.
ToPngOptions
Import from @reductoai/pptx/node.
PageSetup
PowerPoint.PageSetup: the slide size in points.
Import from @reductoai/pptx/officejs.
PageSetup properties
PageSetup.resize()
EnsureFit shrinks content to fit a smaller slide; Maximize keeps it large and lets it
run past an edge. Layouts and masters stretch to the new size.