Introduction
pptxgenjs generates PowerPoint (.pptx) files from JavaScript — in Node, the browser, and every
common framework. This is pptxgenjs-plus: a modern, typed build shaped by community contributions.
If you are migrating from the original pptxgenjs package, see the Migration guide — it is
a drop-in replacement.
How the API works
The library is built on a small object model with three levels:
- Create a Presentation —
new pptxgen(). This is the document. - Add Slides —
pres.addSlide()returns a Slide you add content to. - Add objects to a Slide — every object is one
slide.addX(...)call that takes the content plus an options object. Options follow the same conventions everywhere: position and size arex,y,w,hin inches (or%), and colors are hex strings without#(e.g."363636"). - Save —
pres.writeFile()(Node/browser download) orpres.write(...)for a Blob/Buffer/base64/stream.
This is the complete API surface. The remaining documentation describes the options each addX method accepts.
Hello World
Full TypeScript definitions ship with the package, so your editor autocompletes every method and option. The type definitions are the most complete reference available.
Where to go next
- Quick Start — the four steps above, shown for Node and the browser.
- Installation — npm, yarn, and CDN.
- Compatibility and Integration — bundlers, frameworks, and runtimes.
- Usage (sidebar) — presentation and slide options, and how to save.
- API Reference (sidebar) — the options for Text, Tables, Shapes, Images, Charts, and Media.
- HTML to PowerPoint — turn an HTML
<table>into slides in one call.
Output compatibility
Files are standards-compliant Open Office XML (OOXML) and open in Microsoft PowerPoint, Apple Keynote, LibreOffice Impress, and Google Slides (via import).
Issues and contributing
File issues or ideas on the issues page, or
open a pull request. When reporting a problem, include
a short code snippet that reproduces it. Documentation lives in-repo under
docs/ — the "Edit this page" link on any
page leads directly to its source file.
Contributors
This fork builds on the work of Brent Ely and the original pptxgenjs contributors:
- Dzmitry Dulko — getting the project published on NPM
- Michal Kacerovský — Master Slide layouts and chart expertise
- Connor Bowman — placeholders
- Reima Frgos — chart and general functionality patches
- Matt King, Mike Wilcox — chart expertise
- Joonas — react-pptx
PowerPoint shape definitions and some XML via the Officegen Project.
License
© 2026-present Matěj "lofcz" Štágl