Skip to main content

Quick Start Guide

Create a PowerPoint in 4 easy steps#

PptxGenJS PowerPoint presentations are created by following 4 basic steps. See examples below by environment.

That's really all there is to it!

Modern Node.js Projects#

Sample Code#

HelloWorld.ts
import pptxgen from "pptxgenjs";
// 1. Create a Presentationlet pres = new pptxgen();
// 2. Add a Slide to the presentationlet slide = pres.addSlide();
// 3. Add 1+ objects (Tables, Shapes, etc.) to the Slideslide.addText("Hello World from PptxGenJS...", {    x: 1.5,    y: 1.5,    color: "363636",    fill: { color: "F1F1F1" },    align: pres.AlignH.center,});
// 4. Save the Presentationpres.writeFile({ fileName: "Sample Presentation.pptx" });

TypeScript Support#

Modern application developers using ES6 with Angular, React, TypeScript, etc. benefit from full typescript defs.

Learn as you code in a modern development with included TypeScript definitions the documentation comes to you.

TypeScript Support

Develop your apps quickly without needing to look up documentation.

TypeScript Support

Client Web Browser#

Sample Code#

HelloWorld.js
// 1. Create a new Presentationlet pres = new PptxGenJS();
// 2. Add a Slidelet slide = pres.addSlide();
// 3. Add one or more objects (Tables, Shapes, Images, Text and Media) to the Slideslide.addText("Hello World from PptxGenJS...", {    x: 1.5,    y: 1.5,    color: "363636",    fill: { color: "F1F1F1" },    align: pres.AlignH.center,});
// 4. Save the Presentationpres.writeFile({ fileName: "Sample Presentation.pptx" });