Viewer and slideshow
Scrolling list or full slideshow with fit-to-screen scaling, keyboard control, fullscreen, autoplay and transitions.
Render, present, edit and export .pptx files with pure JavaScript. No server, no plugins, one small dependency.
This is PPTXjs rendering Sample_demo1.pptx live, right now.
PPTXjs reads the Office Open XML format directly: themes, layouts, masters, shapes, text, tables, charts and media.
Scrolling list or full slideshow with fit-to-screen scaling, keyboard control, fullscreen, autoplay and transitions.
Move, resize and restyle shapes, edit text inline, add pictures and shapes, manage slides. Full undo/redo.
Lossless PowerPoint round trip: what you didn't change stays byte for byte. OpenDocument conversion included.
Bar, line, area, pie, doughnut and scatter charts drawn as crisp, dependency-free SVG with theme colours.
Hebrew, Arabic and Persian text with correct punctuation, RTL bullets and numbering, an RTL interface, and auto-detection.
Untrusted files can't inject script. Links are sanitised, zip bombs are rejected, and nothing global is touched.
A plain class for any page, with first-class bindings for popular frameworks. It also runs in Node.js and Web Workers.
import { PptxViewer } from "@meshesha/pptxjs";
const viewer = new PptxViewer("#slides", { mode: "slideshow" });
await viewer.load("deck.pptx"); // URL, File, Blob or bytesimport { PptxViewer } from "@meshesha/pptxjs/react";
export function Deck() {
return <PptxViewer src="/deck.pptx" options={{ mode: "slideshow" }} />;
}<script setup>
import { PptxViewer } from "@meshesha/pptxjs/vue";
</script>
<template>
<PptxViewer src="/deck.pptx" :options="{ mode: 'slideshow' }" @load="onLoad" />
</template>// main.ts
import { definePptxElements } from "@meshesha/pptxjs/angular";
definePptxElements();
// component template (schemas: [CUSTOM_ELEMENTS_SCHEMA])
<pptx-viewer [attr.src]="url" mode="slideshow" (pptx-load)="loaded($event)"></pptx-viewer>// the v1 API keeps working
$("#result").pptxToHtml({
pptxFileUrl: "deck.pptx",
slideMode: true
});<script src="https://unpkg.com/@meshesha/pptxjs/dist/pptxjs.umd.js"></script>
<pptx-viewer src="deck.pptx" mode="slideshow" transition="slide"></pptx-viewer>import { renderToHtml, PresentationDocument, exportOdpBytes } from "@meshesha/pptxjs";
const { slides, css } = await renderToHtml(await readFile("deck.pptx"));
const doc = await PresentationDocument.load(await readFile("deck.pptx"));
await writeFile("deck.odp", exportOdpBytes(doc));Swap nine script tags for one. Existing $(…).pptxToHtml() calls keep working, and you get dozens of bug fixes, security hardening and a much faster renderer.