Quick Start
PaperJSX turns structured JSON into native PPTX, DOCX, XLSX, and PDF files. The four lite engines are Apache-2.0 licensed and work without an account; paid plans unlock Pro features across all four formats.
Install a package
Choose the output format you need:
npm install @paperjsx/json-to-pptx
The equivalent packages are @paperjsx/json-to-docx, @paperjsx/json-to-xlsx, and @paperjsx/json-to-pdf.
Render a document
import { PaperEngine } from "@paperjsx/json-to-pptx";
import { writeFileSync } from "node:fs";
const buffer = await PaperEngine.render({
type: "Document",
meta: { title: "Quarterly Update" },
slides: [
{
type: "Slide",
style: { padding: 40, backgroundColor: "#FFFFFF" },
children: [
{
type: "Text",
content: "Quarterly Update",
style: { fontSize: 28, fontWeight: "bold", color: "#1E293B" },
},
{
type: "Text",
content: "Revenue grew 28% year over year.",
style: { marginTop: 12, fontSize: 18, color: "#334155" },
},
],
},
],
});
writeFileSync("deck.pptx", buffer);
PaperEngine.render returns a buffer you can write to a file, object store, or HTTP response. @napi-rs/canvas is an optional peer used only by raster-preview paths; normal document rendering detects its absence without logging an error. Install it only if your application calls the canvas preview APIs. Start in the playground to validate payloads interactively, then read the PPTX package guide or choose a package for production details.
Use the hosted API or MCP server
For authenticated hosted Platform rendering, follow the hosted API quick start. For Claude, Cursor, and other local MCP integrations, use the MCP server guide.