PaperJSX

Getting Started

  • Overview
  • Choose a Package

Packages

  • PPTX
  • PDF
  • DOCX
  • XLSX
  • MCP Server

Hosted API

  • Quick Start
  • API Reference
  • Migrate V1 to V2

Plans

  • License & Pricing

PPTX

Generate native .pptx files from JSON and TypeScript.

Install

Terminal
npm install @paperjsx/json-to-pptx

Requires Node.js >=20. ESM only.

Quick Start

TypeScript
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);

Core API

  • PaperEngine.render(document, options?) — returns a Uint8Array of the .pptx file.

Additional exports include Zod schemas (PaperDocumentSchema, PaperSlideSchema, PaperNodeSchema), error classes (PaperError, PaperJSXFeatureError), typography helpers (loadFont, calculateTextMetrics, autoLoadDocumentFonts), and the lower-level runLayout for custom pipelines.

Pro

@paperjsx/json-to-pptx-pro adds templates, HarfBuzz text shaping, ChartEx, SmartArt, canvas preview, and production/self-hosted commercial rights.

Terminal
npm install @paperjsx/json-to-pptx-pro
TypeScript
import { createEngine } from "@paperjsx/json-to-pptx-pro";
import { writeFileSync } from "node:fs";

const pptx = createEngine({
  licenseKey: process.env.PAPERJSX_LICENSE_KEY,
});

const buffer = await pptx.render({
  type: "Document",
  meta: { title: "Board Review" },
  slides: [
    {
      type: "Slide",
      style: { padding: 40 },
      children: [
        {
          type: "Text",
          content: "Board Review",
          style: { fontSize: 30, fontWeight: "bold", color: "#0F172A" },
        },
        {
          type: "Text",
          content: "ARR is up 41% year over year.",
          style: { marginTop: 12, fontSize: 18, color: "#334155" },
        },
      ],
    },
  ],
});

writeFileSync("board-review.pptx", buffer);

Set PAPERJSX_LICENSE_KEY from your dashboard. See License & Pricing.

PreviousChoose a PackageNextPDF