Skip to main content
Import from @reductoai/pptx/node. It gives a PowerPointPresentation that reads and writes files and renders with the fonts on the machine.

Open, edit, save

save always needs a path. The facade never writes over the input file by itself. Setting TextRange.text keeps the formatting of the first replaced character, as Microsoft PowerPoint does.

Create a new deck

To pick a layout, pass its id: deck.slides.add({ layoutId: deck.slideMasters.getItemAt(0).getLayoutByName("Blank").id }). See Blank decks.

Bytes in, bytes out

When the deck comes from a request or a bucket, use bytes:

Render

Both render the current edit state. You do not need to save first. See PDF and PNG.

Common tasks