Skip to main content

Integration

Available Distributions#

  • Browser dist/pptxgen.min.js
  • CommonJS dist/pptxgen.cjs.js
  • ES6 Module dist/pptxgen.es.js

Integration with Angular/React#

React Example#

import pptxgen from "pptxgenjs";let pptx = new pptxgen();
let slide = pptx.addSlide();slide.addText("React Demo!", { x: 1, y: 1, w: 10, fontSize: 36, fill: { color: "F1F1F1" }, align: "center" });
pptx.writeFile({ fileName: "react-demo.pptx" });

Webpack Troubleshooting#

Some users have modified their webpack config to avoid a module resolution error using:

  • node: { fs: "empty" }

Related Issues#