Skip to content

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 ​

TaskPackage
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.

bash
npm install @sliiu/present-parser @sliiu/present-player @sliiu/present-editor

Each 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.

ts
import { parsePptx } from "@sliiu/present-parser";
import { writePptx } from "@sliiu/present-serializer";

const pres = await parsePptx(await file.arrayBuffer());
const pptx = writePptx(pres);
js
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.

ts
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.

ts
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.

html
<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:

ts
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 ​

PathUse
@sliiu/present-player/exportbuildHtml, buildHtmlBundle
@sliiu/present-player/iifeThe browser file
@sliiu/present-serializer/source-jsonThe original package as JSON
@sliiu/present-editor/commandsEditor commands
@sliiu/present-ai/configYour own model settings
@sliiu/present-ui/tokens.cssUI variables
@sliiu/present-plugin-sdk/iifeThe plugin file
ts
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.

PackageRole
@sliiu/present-animationTiming and easing for on-slide animation
@sliiu/present-coreSlides, shapes, and color
@sliiu/present-parserRead .pptx
@sliiu/present-serializerWrite .pptx
@sliiu/present-three-bakePrepare 3D shapes for the renderer
@sliiu/present-rendererDraw a slide to SVG, Canvas, or WebGL
@sliiu/present-transition-fxSlide transitions and Morph
@sliiu/present-plugin-sdkPlayback plugins
@sliiu/present-themesThemes, palettes, and decoration
@sliiu/present-uiUI variables and controls. The stylesheet is tokens.css
@sliiu/present-playerPresent, and export HTML / PDF / PNG
@sliiu/present-editorThe editing surface
@sliiu/present-aiCall 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.