
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
pptxviewjs
Advanced tools
A JavaScript library for viewing PowerPoint presentations in web browsers using Canvas rendering
PowerPoint presentations, rendered in the browser.
PptxViewJS is a client-side JavaScript library that parses .pptx files and renders slides using HTML5 Canvas — no server, no file uploads, no conversion services required.
👉 Product page · Interactive Demo · All demos
The interactive demo showcases the full client-side presentation round-trip:
.pptx file entirely in the browser..pptx file at any time.The live code panel shows the exact PptxGenJS source used to generate each slide. No server involved at any step.
Available templates: Bar/Line/Pie/Area charts · Sales & comparison tables · Shapes · Text formatting · Full multi-slide deck (~18 slides)
| Demo | Description |
|---|---|
| 🎮 Interactive Demo | Generate with PptxGenJS → render with PptxViewJS, live in the browser |
| 📄 Simple Viewer | Minimal drag-and-drop viewer — perfect starting point |
| 🖥️ Full Featured UI | Office Online–style: thumbnails, zoom, fullscreen, keyboard shortcuts |
| 📚 Embedded Layout | Split view with thumbnail sidebar for docs portals and LMS platforms |
Choose your preferred method to install PptxViewJS:
npm install pptxviewjs
yarn add pptxviewjs
Use the UMD build via jsDelivr. Include JSZip (required) before the library. Include Chart.js (optional) if you need chart rendering:
<!-- Required: JSZip -->
<script src="https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js"></script>
<!-- Optional: Chart.js (only if your presentations contain charts) -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<!-- PptxViewJS UMD build exposes global `PptxViewJS` -->
<script src="https://cdn.jsdelivr.net/npm/pptxviewjs/dist/PptxViewJS.min.js"></script>
Note: JSZip is required for PPTX (ZIP) parsing. Chart.js is optional and only needed when rendering charts.
Install JSZip (required). Install Chart.js if your presentations include charts:
npm install jszip
# Optional (for charts)
npm install chart.js
PptxViewJS works seamlessly in modern web and Node environments, thanks to dual ESM and CJS builds and zero runtime dependencies. Whether you're building a web app, an Electron viewer, or a presentation platform, the library adapts automatically to your stack.
canvas) for renderingdist/PptxViewJS.cjs.jsdist/PptxViewJS.es.jsdist/PptxViewJS.min.jsPptxViewJS presentations are viewed via JavaScript by following 3 basic steps:
import { PPTXViewer } from "pptxviewjs";
// 1. Create a new Viewer
let viewer = new PPTXViewer({
canvas: document.getElementById('myCanvas')
});
// 2. Load a Presentation
await viewer.loadFile(presentationFile);
// 3. Render the first slide
await viewer.render();
<canvas id="myCanvas"></canvas>
<input id="pptx-input" type="file" accept=".pptx" />
<button id="prev">Prev</button>
<button id="next">Next</button>
<div id="status"></div>
<script src="PptxViewJS.min.js"></script>
<script>
const { mountSimpleViewer } = window.PptxViewJS;
mountSimpleViewer({
canvas: document.getElementById('myCanvas'),
fileInput: document.getElementById('pptx-input'),
prevBtn: document.getElementById('prev'),
nextBtn: document.getElementById('next'),
statusEl: document.getElementById('status')
});
</script>
Need finer control? You can still instantiate new PptxViewJS.PPTXViewer() manually and use the same APIs shown above.
That's really all there is to it!
Navigate through presentations with simple, chainable methods:
// Navigate through slides
await viewer.nextSlide(); // Go to next slide
await viewer.previousSlide(); // Go to previous slide
await viewer.goToSlide(5); // Jump to slide 5
// Get information
const currentSlide = viewer.getCurrentSlideIndex();
const totalSlides = viewer.getSlideCount();
Listen to presentation events for custom interactions:
// Listen to events
viewer.on('loadStart', () => console.log('Loading started...'));
viewer.on('loadComplete', (data) => console.log(`Loaded ${data.slideCount} slides`));
viewer.on('renderComplete', (slideIndex) => console.log(`Rendered slide ${slideIndex}`));
viewer.on('slideChanged', (slideIndex) => console.log(`Now viewing slide ${slideIndex}`));
Thank you to everyone for the contributions and suggestions! ❤️
Special Thanks:
If you find this library useful, consider contributing to open-source projects, or sharing your knowledge on the open social web. Together, we can build free tools and resources that empower everyone.
Copyright © 2025 Alex Wong
FAQs
A JavaScript library for viewing PowerPoint presentations in web browsers using Canvas rendering
The npm package pptxviewjs receives a total of 20,118 weekly downloads. As such, pptxviewjs popularity was classified as popular.
We found that pptxviewjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.