Skip to content
Paged.

Professional publishing, beyond the desktop.

Developers

PagedFor developers

A document
you can program.

Render documents in your own product, script updates to them, build extensions, embed the editor and read a document’s structure as data. The engine that lays out the page answers to code; start from the task in front of you.

01Five tasks

Start from
the task.

Pick what you are building. Each card names the package it needs and what npm serves of it, then the docs’ quickstart; the real code for each task follows below, with where it was copied from.

  • In the browser, or from a shell

    Render a document

    Pages of an IDML document on a canvas in your product, or a PDF from a shell.

    @paged-media/viewer on npm: 0.74.2

  • Scripts and the command line

    Script updates to a document

    paged.* scripts in the editor, and the same engine from a shell, every write undoable.

    In the editor, nothing to install; @paged-media/paged on npm: 0.74.2

  • The plugin contract

    Build an extension

    A plugin: a manifest and an activate function that adds commands, tools, panels and importers.

    @paged-media/plugin-sdk on npm: 0.74.2

  • In your product

    Embed the editor

    The whole editor, one module, a template form or a viewer, in your page.

    @paged-media/editor is not on npm yet (checked 21 November 2026)

  • The document as data

    Read the document’s structure

    Every collection, story, element and part as JSON, from a shell; an AI agent reaches the same engine.

    @paged-media/paged on npm: 0.74.2

Driven from a script, recorded

The playground steps through a live script; the Script panel queries every frame and restyles them in one batch, undone in one step; a plugin’s manifest is validated; and the command line authors, queries and exports a document with no browser at all.

  1. 0:07A script, step by step.
  2. 0:26Ask the document anything.
  3. 0:46A manifest, a panel.
  4. 1:02The same engine, headless.

A document you can program

1:31, recorded

The playground steps through a script against the real editor; the Script panel lists every frame by its address and restyles them in one batch, one undo; a plugin manifest is validated; and the paged command line creates, scripts, queries and exports a document.

Recording details

Recorded on 21 November 2026 in the paged editor (commit e023cf142), real time apart from the cuts marked in the film. It shows sample publications from archive.org, used for illustrative and demonstration purposes only; they remain their publishers' property (paged.media/imprint). Voice: synthetic (Qwen3-TTS, Aiden). The commit: e023cf1.

Transcript

This is paged for developers: one engine, driven from a script, a plugin or a shell.

The playground runs a script against the real editor, with its source beside it.

Pause it, step through it one line at a time, or let it play.

In the Script panel, one query lists every frame on the page, by its address.

One batch call restyles all of them, as a single step.

So a single undo takes all of it back.

A plugin is a manifest and its code. The manifest declares the panels it brings.

Loaded into the editor, its panels open like any other.

And from a shell, the same engine authors, queries and exports a document, with no browser at all.

Every surface, one engine. Open the playground at play.paged.media.

The film as an MP4 file (H.264, 11 MB)Captions (WebVTT)

Task 01In the browser, or from a shell

Render a document

@paged-media/viewer draws a document’s pages onto a canvas you own, with a camera, page navigation and events. It renders with WebGPU only: without it, the session rejects. Register the document’s fonts on the session before you load it.

Without a browser, the paged command for Node exports the same document as PDF, IDML or .paged; it is tested, but may still change.

The viewer SDKEmbedding guide

viewer.ts

import {
  createViewer,
  createSessionFromBundledWasm,
} from "@paged-media/viewer";

const viewer = await createViewer({
  canvas: document.querySelector("canvas")!,
  session: createSessionFromBundledWasm, // wasm ships inside this package
});

viewer.on("pageChanged", ({ page }) => console.log("page", page + 1));
await viewer.load("/files/brochure.idml"); // URL | ArrayBuffer | Uint8Array | Blob
viewer.fit("width");
As in the README of @paged-media/viewer; every method is in its API catalogue.

Shell

npx @paged-media/paged export brochure.idml -o brochure.pdf
From The paged command from npm. Node 22 or later, or Bun; no Rust toolchain.

Task 02Scripts and the command line

Script updates to a document

In the editor, paged.* scripts read the document as JSON, address an element by kind:id and write through the same channel as a person’s edits: 169 scriptable operations, 258 settable paths, and 117 runnable examples in the docs.

Outside it, the same engine runs from a shell. The paged binary built from the repository has 52 commands; the one on npm, which is tested, but may still change, sets and exports any property the engine or a module publishes.

ScriptingThe command line

Script panel

const [el] = JSON.parse(paged.selection());
const ref = el.kind + ':' + el.id;
paged.set(ref, 'frameFillColor', 'Color/Red');
paged.set(ref, 'frameStrokeColor', 'Color/Black');
paged.set(ref, 'frameStrokeWeight', 4);
paged.set(ref, 'frameRotationAngle', 12);
From Your first script, where it runs in a live editor. Every write is undoable: paged.undo() reverts it.

Shell

npx @paged-media/paged set brochure.idml page:#1 itemName Cover -o out.paged
npx @paged-media/paged export brochure.idml -o brochure.pdf
From The paged command from npm.

Task 03The plugin contract

Build an extension

A plugin is a manifest and an activate function. It registers commands, tools, panels and importers through the host it is handed, inside its own namespace, and everything it registered goes away when it is unloaded.

Types come from @paged-media/plugin-sdk/api, values from @paged-media/plugin-sdk. The built-in modules are written against the same contract.

The plugin SDKplatform/extensions

manifest.json

{
  "id": "com.example.hello",
  "name": "Hello Paged",
  "version": "0.1.0",
  "apiVersion": "^0.2",
  "capabilities": {
    "document": { "read": "broad", "write": "scoped" },
    "keybindings": true
  },
  "contributes": {
    "commands": ["com.example.hello.command.report"]
  }
}

bundle.ts

import { defineBundle } from "@paged-media/plugin-sdk";
import type { PluginManifest } from "@paged-media/plugin-sdk/api";
import manifest from "./manifest.json";

export const helloBundle = defineBundle({
  manifest: manifest as PluginManifest,
  activate(host) {
    host.contribute.command({
      id: "com.example.hello.command.report",
      title: "Report selection",
      category: "Hello",
      handler: async () => {
        const ids = host.selection.get();
        const meta = await host.document.meta();
        host.log.info(`${ids.length} selected, ${meta.pageCount} pages`);
      },
    });
    return { dispose() {} };
  },
});
Shortened from Your first plugin, which adds a keyboard shortcut and loads the bundle.

Shell

npx -p @paged-media/plugin-sdk paged-plugin init hello-paged
npx -p @paged-media/plugin-sdk paged-plugin validate manifest.json
The paged-plugin bin of @paged-media/plugin-sdk: init writes a minimal extension, validate checks a manifest.

Task 04In your product

Embed the editor

createEditor mounts the editor into an element of your page, shaped by a profile, and resolves to a handle: load and save documents, fill a template’s fields, export a PDF, listen to its events.

The page must be cross-origin isolated, because the engine shares memory with its worker. A page that cannot send those headers drives the editor in a frame instead. To show pages without editing them, the viewer of the first task is the smaller package.

The embeddable editor, and what it needscreateEditor

editor.ts

import { createEditor } from "@paged-media/editor";
import "@paged-media/editor/style.css";

const editor = await createEditor(document.getElementById("editor")!, {
  profile: "template-fill",
  document: { bytes: templateBytes, name: "card.paged" },
  actions: { submit: async () => send(await editor.save()) },
});
await editor.setFieldValues({ name: "Ada Lovelace" });
editor.on((event) => {
  if (event.type === "fieldChange") console.log(event.fields);
});
As in the README of @paged-media/editor. The package is built on main and is not on npm yet (checked 21 November 2026) (PM-0013).

Task 05The document as data

Read the document’s structure

A document is structure you can read, not only pixels. From a shell, paged inspect and paged read answer as JSON for its layers, collections, stories and any element addressed by kind:id, the address paged.set takes; paged parts lists and reads the parts of a .paged container, itself a valid IDML package.

An AI agent reaches the same engine: paged mcp opens, scripts, renders and saves documents for an MCP client, and is tested, but may still change.

The command line’s referenceInspect an IDML file in your browser

Shell

paged inspect doc.paged --json
paged read collection doc.paged swatches
paged read story-content doc.paged Story/u0
paged read element-properties doc.paged textFrame:u12
paged parts list doc.paged
The engine’s paged binary, as its README gives these commands: the reads print the engine’s own reply envelope, the one the editor receives.

Shell

npx @paged-media/paged get brochure.idml 'swatch[name=Black]'
From The paged command from npm.

MCP client configuration

{
  "mcpServers": {
    "paged": { "command": "npx", "args": ["-y", "@paged-media/paged", "mcp"] }
  }
}
paged mcp serves the engine to an MCP client over stdio; from the same page.

02Packages

What you
install.

Four public packages are built from the repository, and a release tag publishes them. Everything else in it is private to the build.

On npm today: @paged-media/paged 0.74.2, @paged-media/viewer 0.74.2 and @paged-media/plugin-sdk 0.74.2; the newest release tag, v0.77.0, is not on npm. @paged-media/editor is not on npm yet (checked 21 November 2026) (PM-0013).

Shipping a closed product? Paged is AGPL-3.0 or PMEL. Under the AGPL, a product that combines Paged is under the AGPL too, use over a network included (section 13), so its users get its source. For a closed or hosted product, the PMEL is the commercial licence from And The Next GmbH. Discuss a commercial licence

The public packages and where they come from
PackageWhat it isSourceOn npm
@paged-media/pagedThe engine as wasm, and the paged command with paged mcppackages/paged0.74.2
@paged-media/viewerThe WebGPU viewer and its renderer-only sessionengine/core/web/idml-viewer0.74.2
@paged-media/plugin-sdkThe plugin runtime, the contract as ./api, and the paged-plugin binplatform/extensions0.74.2
@paged-media/editorcreateEditor, mountEditor and the ./iframe bridgeapps/editor/packages/editornot on npm yet (checked 21 November 2026)

The version npm serves as its latest, checked on 21 November 2026.

The docs ship as plain text for machines too: llms.txt and llms-full.txt. How the engine works is on the technology page.

Where to next

Pick up
the thread.

The editor in your product, a review of your own project, and the licence the source is under.

  1. 01 / Embed

    The embeddable editor.

    createEditor, its profiles, the iframe bridge and what your page needs.

  2. 02 / Review

    Will Paged work with your product?

    Describe what you are building on the engine, and ask which of it Paged supports today.

  3. 03 / Contribute

    Open engine, open format.

    The licence, the repository and how to send a change.

Searchpaged.media, Docs and IDML

Esc