Open source
Slim Office is the open-source release. The presentation component is the present/ directory. It opens a .pptx, edits and presents it in the browser, and writes .pptx, HTML, PDF, or PNG.
The license is AGPL-3.0-or-later. The copyright holder is Sliiu Inc. A closed-source embed requires a commercial license: see COMMERCIAL.md in that repository, or email support@slimppt.com.
Accounts, online sharing, online storage, live present, collaboration, and the hosted model stay on this site. They are not in these packages.
Install
| Task | Package |
|---|---|
Read a .pptx | @sliiu/present-parser |
Write a .pptx | @sliiu/present-serializer |
| Present, or export HTML / PDF / PNG | @sliiu/present-player |
| Edit | @sliiu/present-editor |
| Playback plugins | @sliiu/present-plugin-sdk |
| Call a model with your own key | @sliiu/present-ai |
Install only the player when you only need playback. The editor also installs text recognition, OpenCV, and equation rendering.
npm install @sliiu/present-parser @sliiu/present-player @sliiu/present-editorEach entry ships TypeScript types, an ESM import, and a CommonJS require.
Read and write
parsePptx accepts an ArrayBuffer, Uint8Array, Blob, or File. Password-protected files and legacy .ppt are refused. writePptx returns the .pptx bytes.
import { parsePptx } from "@sliiu/present-parser";
import { writePptx } from "@sliiu/present-serializer";
const pres = await parsePptx(await file.arrayBuffer());
const pptx = writePptx(pres);const { parsePptx } = require("@sliiu/present-parser");Present and edit
In a bundled page, mount into an element you already have. mount and mountEditor take the parsed presentation, not the original file.
import { mount } from "@sliiu/present-player";
import { mountEditor } from "@sliiu/present-editor";
mount(stage, pres);
mountEditor(editor, pres);PDF and PNG run in the browser. exportPresentationPdf returns one PDF Blob. snapshotAll returns one PNG Blob per slide.
import { exportPresentationPdf, snapshotAll } from "@sliiu/present-player";
const pdf = await exportPresentationPdf(pres);
const slides = await snapshotAll(pres);A plain HTML page
dist/player.iife.js loads from a normal script tag. The global is PPTPlayer.
<script src="node_modules/@sliiu/present-player/dist/player.iife.js"></script>
<script>
PPTPlayer.mount(document.querySelector("#stage"), presentation);
</script>The plugin file is dist/plugin-sdk.iife.js. Its global is PPTPluginSDK. The player script already includes PPTPlayer.definePlugin.
To write a standalone HTML file, pass the text of player.iife.js to buildHtml:
import { readFileSync } from "node:fs";
import { buildHtml } from "@sliiu/present-player/export";
const playerScript = readFileSync(
"node_modules/@sliiu/present-player/dist/player.iife.js",
"utf8",
);
const html = buildHtml(pres, playerScript, { title: "Deck" });buildHtmlBundle writes the HTML plus an assets/ directory instead of one file.
Other entries
| Path | Use |
|---|---|
@sliiu/present-player/export | buildHtml, buildHtmlBundle |
@sliiu/present-player/iife | The browser file |
@sliiu/present-serializer/source-json | The original package as JSON |
@sliiu/present-editor/commands | Editor commands |
@sliiu/present-ai/config | Your own model settings |
@sliiu/present-ui/tokens.css | UI variables |
@sliiu/present-plugin-sdk/iife | The plugin file |
import { definePlugin } from "@sliiu/present-plugin-sdk";
import { defaultConfig, parseConfig } from "@sliiu/present-ai/config";definePlugin checks id and activate. In the browser it registers the plugin for the next PPTPlayer.mount.
Packages
@sliiu/present-player and @sliiu/present-editor install the packages they depend on. Install one of these on its own when you call that layer directly.
| Package | Role |
|---|---|
@sliiu/present-animation | Timing and easing for on-slide animation |
@sliiu/present-core | Slides, shapes, and color |
@sliiu/present-parser | Read .pptx |
@sliiu/present-serializer | Write .pptx |
@sliiu/present-three-bake | Prepare 3D shapes for the renderer |
@sliiu/present-renderer | Draw a slide to SVG, Canvas, or WebGL |
@sliiu/present-transition-fx | Slide transitions and Morph |
@sliiu/present-plugin-sdk | Playback plugins |
@sliiu/present-themes | Themes, palettes, and decoration |
@sliiu/present-ui | UI variables and controls. The stylesheet is tokens.css |
@sliiu/present-player | Present, and export HTML / PDF / PNG |
@sliiu/present-editor | The editing surface |
@sliiu/present-ai | Call a model with your own key |
Video export loads @ffmpeg/core from unpkg in the browser. That build is GPL-2.0-or-later and is outside the commercial contract. Other third-party licenses are in THIRD-PARTY-NOTICES.md in the repository.