JavaScript PowerPoint Library
npm install bulletpointsThis is a fork from PPTxGenJS
Documentation is for now kept from the fork.
JavaScript library that creates PowerPoint presentations
- Creates presentations on all current web browsers and IE11
- Slides can include Charts, Images, Media, Shapes, Tables and Text, etc.
- Powerful HTML-to-PowerPoint feature to transform any HTML table into a presentation
- Modern, pure JavaScript, promise-based library
- Only a single dependency (JSZip)
- Easy Angular/React integration (available via npm, cjs or es files)
---
Table of Contents
- Demo
- Installation
- CDN
- Download
- Npm
- Yarn
- Additional Builds
- Documentation
- Quick Start Guide
- Library API
- HTML-to-PowerPoint Feature
- Issues / Suggestions
- Need Help?
- Unimplemented Features
- Contributors ✨
- License
---
Use JavaScript to create a PowerPoint presentation with your web browser right now!
- https://gitbrent.github.io/PptxGenJS
The complete library demo is also online.
- https://gitbrent.github.io/PptxGenJS/demo/
``html
`
`html
`
`bash`
npm install pptxgenjs --save
`javascript`
let PptxGenJS = require('pptxgenjs')
let pptx = new PptxGenJS()
`bash`
yarn add pptxgenjs
- CommonJS: dist/pptxgenjs.cjs.jsdist/pptxgenjs.es.js
- ES Module:
---
PptxGenJS PowerPoint presentations are created via JavaScript by following 4 basic steps:
1. Create a new Presentation
2. Add a Slide
3. Add one or more objects (Tables, Shapes, Images, Text and Media) to the Slide
4. Save the Presentation
`javascript`
var pptx = new PptxGenJS()
var slide = pptx.addSlide()
slide.addText('Hello World from PptxGenJS!', {
x: 1,
y: 1,
w: '80%',
h: 3,
color: '363636',
align: 'center',
fill: 'f1f1f1'
})
pptx.writeFile('Sample Presentation')
That's really all there is to it!
---
Full documentation and code examples are available
- Creating a Presentation
- Presentation Options
- Adding a Slide
- Slide Options
- Saving a Presentation
- Master Slides
- Adding Charts
- Adding Images
- Adding Media
- Adding Shapes
- Adding Tables
- Adding Text
- Speaker Notes
- Using Scheme Colors
- Creating a Presentation
- Integration with Other Libraries
Note: Typescript Definitions are included
---
Easily convert HTML tables to PowerPoint presentations in a single call.
`javascript`
var pptx = new PptxGenJS()
pptx.tableToSlides('tableId')
pptx.writeFile('HTML-table.pptx')
Learn more:
- HTML-to-PowerPoint Documentation
- Online HTML-to-PowerPoint Demo
---
Please file issues or suggestions on the issues page on github, or even better, submit a pull request. Feedback is always welcome!
When reporting issues, please include a code snippet or a link demonstrating the problem.
Here is a small jsFiddle that is already configured and uses the latest PptxGenJS code.
---
Sometimes implementing a new library can be a difficult task and the slightest mistake will keep something from working. We've all been there!
If you are having issues getting a presentation to generate, check out the demos in the examples directory. There
are demos for both Nodejs and client-browsers that contain working examples of every available library feature.
- Use a pre-configured jsFiddle to test with: PptxGenJS Fiddle
- View questions tagged PptxGenJS on StackOverflow. If you can't find your question, ask it yourself - be sure to tag it PptxGenJS`.
---
The PptxGenJS library is not designed to replicate all the functionality of PowerPoint, meaning several features
are not on the development roadmap.
These include:
- Animations
- Importing Existing Presentations and/or Templates
- Outlines
- SmartArt
---
Thank you to everyone for the issues, contributions and suggestions! ❤️
Special Thanks:
- Dzmitry Dulko - Getting the project published on NPM
- Michal Kacerovský - New Master Slide Layouts and Chart expertise
- Connor Bowman - Adding Placeholders
- Reima Frgos - Multiple chart and general functionality patches
- Matt King - Chart expertise
- Mike Wilcox - Chart expertise
PowerPoint shape definitions and some XML code via Officegen Project
---
Copyright © 2019-2020 Steve Genoud
Copyright © 2015-2019 Brent Ely