PagedProduct chapterThe rendering engine
From structure
to pixels.
Paged’s engine is written in Rust and compiled to WebAssembly. It reads IDML, lays every page out into one display list, and draws that list on the CPU or the GPU. The editor, the command line and the viewer all run it.
Why it matters for a publication
The editor in a browser tab and the command line on a server run the same engine, so the page you approve on screen and the PDF an automated job exports come from one layout, not two programs that drift apart. Every property of the document can be read and set from a script, so a job done once by hand can be repeated without anyone at a screen. And the document stays an IDML package, open to inspection part by part, rather than a format only one program can read.
The engine, stage by stage
Exhibit 1From document bytes to pixels
In: a document as bytes, an .idml package or a .paged container
- 1Load
CanvasModel::loadthe IDML parts, or the .paged model part - 2Build
pipeline::build_documentlays out the whole document - 3Assets
AssetResolverfonts, images and the CMYK profile, handed inHanded to stage 2 - 4Display list
DisplayListone per page: glyphs as outlines, paints resolved - 5Raster
vello_cputhe default: an RGBA image for the command line, snapshots and the fidelity gateVelloon the GPU: the browser’s canvas, through SurfacePresenterOut: an image, or the browser’s canvas - 6PDF
paged-export-pdfwritten from the display lists, a page per messageFrom the display lists of stage 4
01A system of relationships
Six stages,
one display list.
The document is laid out once into a display list per page, and every output reads those lists: the editor’s canvas, a PNG from the command line, the PDF export.
The engine is one Rust workspace, engine/core, built three ways: to WebAssembly for the editor, which runs it in a worker beside the page; to WebAssembly for the viewer, a renderer-only session that links none of the editing crates; and natively, as the paged command line.
Two rasters, one listpaged-gpu has one rasteriser trait and two implementations behind Cargo features: vello_cpu, the default, and Vello on wgpu. Both read the display list through one shared mapping. Ink separations exist on the CPU path only.
Two rasters, one list
Each of them takes the same path. Two builds of a document are equal when their display lists hash the same.
Load
Opens the ZIP. A .paged container whose model part the store accepts is rebuilt from that part with no IDML parse; otherwise, or when the part has another format version, the IDML parts are parsed. The viewer calls the IDML importer directly.
Build
Lays out the whole document and returns one built page per page, each with its display list, plus diagnostics. The renderer keeps no layout state between calls. Running headers and cross-references cost a second pass; a story with a grow rule is rebuilt with generated pages until it fits, at most 24 passes.
Assets
The pipeline does no file or network I/O. Fonts and placed images come through the asset resolver, and the CMYK profile arrives as bytes. No typeface and no profile is bundled; degraded output is reported in the build's diagnostics.
Display list
A flat list of commands with pools for paths, gradients, images and spot inks. Text becomes one filled path per glyph; clips, blend groups, layers and soft masks are brackets in the same stream. Paints are resolved when the list is built, and a CMYK paint keeps its channels. Its digest is the equality test between two builds.
Raster
vello_cpu draws a list into an RGBA image: this is what the command line, CPU snapshots, ink coverage and the fidelity gate use. VelloRasterizer draws the same list with Vello on the GPU; in the browser, SurfacePresenter presents it to a canvas. Ink separations exist on the CPU path only.
paged-gpu/src/vcpu.rs,paged-gpu/src/vello_map.rs,paged-gpu/src/ink_planes.rsPDF
The export session rebuilds the document once, with the glyph-run side channel on and the live build's caches off; paged-export-pdf then writes the pages from those display lists, one page per message.
02One page, every stage
A structured document,
composed into a page.
The engine turns document structure into frames and stories, composes text, resolves the page and produces the display list used by every output path.
Parse and resolve
Read the package, its stories, resources, styles and page geometry into a structured scene.
Compose and lay out
Shape text, break paragraphs, flow stories through frames and resolve the final page geometry.
Present and export
Draw the same display list in the browser, on the CPU or GPU, and into production output.
03The format
IDML,
read and written.
IDML is the XML package InDesign writes. Paged opens it as its own format and writes it back, and a .paged file is an IDML package with Paged’s own parts beside the format’s.
| Capability | Record |
|---|---|
| Open an IDML package: designmap, spreads, stories, resources | Stable, tested |
| Write a parsed document back to IDML | Stable, tested |
| The .paged container: valid IDML with module parts and a manifest | Stable, tested |
Lifecycle and health from the capability record of ; the words are defined in the evidence panel below.
What the format holds is documented apart from Paged, at idml.paged.media: an atlas of IDML, element by element, built from a census of real files rather than from a specification. The census surveyed 305 documents and observed 281 elements in them; 195 of those have an entry in the reference.
Why 195 of 281An element gets an entry when Paged reads it, or when it appears in at least three documents with attributes or children of its own. Elements found only in the package’s metadata are left out.
Why 195 of 281
Each chapter is anchored on a small example package, written by hand and validated against the pinned engine in CI: 36 of them. 34 have also been opened in InDesign, and their pages show InDesign’s render beside Paged’s.
The atlas does not claim that Paged matches InDesign. On each element’s page, what Paged reads and writes is a column of its own, beside the facts of the format.
The census
- Documents surveyed
- 305
- Elements observed
- 281
- Elements with an entry
- 195
Census of , from idml-census.json in the docs repository. It is re-run by hand; the date says how old it is.
04Programmable
The doors
into the engine.
Every surface drives the engine through the same typed door the editor’s worker uses. The command line cannot apply an edit the editor cannot, and a script’s writes are undone like a person’s.
| Door | What it does | Where it lives | Record |
|---|---|---|---|
| Scripting | paged.* in the editor’s script panel and headless: 169 scriptable operations and 258 settable property paths, each write undoable. | paged-script | Stable, tested |
| Command line | The paged binary opens, authors, renders, exports and verifies documents from a shell: 52 commands. A paged command for Node comes from npm as @paged-media/paged. | paged-cli | Stable, tested |
| Headless session | paged session speaks the engine’s protocol as NDJSON on standard input and output. | paged-run | Stable, tested |
| Viewer | @paged-media/viewer: pages in your own product, through a WebGPU session that links only the renderer. | web/idml-viewer | — |
| Plugin SDK | @paged-media/plugin-sdk: a manifest and activate(host); commands, tools, panels and importers on the editor’s own mutation door. | platform/extensions | — |
| paged.server | Optional. Sync, sharing and change requests for document repositories, on Cloudflare Workers. The editor is complete without it. | apps/server | — |
Figures from facts.json on docs.paged.media; states from the capability record of . A dash: the record tracks the parts of that door, not the door as one capability.
05Evidence
How a claim
becomes evidence.
Every capability Paged tracks has one row in a registry. The row says which layers implement it: that is a claim, and it is never counted as proof.
How the capability state worksThe layers a row names are the engine’s parser or renderer, the editor, a module. Proof comes from tests. A test names the capabilities it proves, and each night, and after every test run on main, the registry joins the newest results to its rows and derives each one’s health.
The documentation and this site are built from that record; no figure on them is typed by hand, and a record older than two weeks is shown as not current.
The record tracks 843 capabilities. 547 are stable, and 506 of those are tested: their tests passed in a run newer than their latest change.
Stage
- Stable
- 538
- Stable (beta)
- 9
- Works, may still change
- 259
- Planned, not built
- 26
- Being retired
- 10
- No stage set yet
- 1
Tests
- Tested
- 753
- Tested before its latest change
- 1
- Not yet tested
- 89
Taken from the latest CI test runs; nobody writes it down.
Stable is not the same as tested, and tested is not the same as ready for your production. The record states the first two; it never states the third.
06The source
One repository,
one revision.
The engine, the modules, the extension SDK, the editor and the server live in one public repository, paged-media/paged, under AGPL-3.0 or PMEL.
| Path | What it is |
|---|---|
| engine/core | Rust render engine: IDML parsing, composition, GPU rendering, WASM interfaces |
| modules/* | Built-in modules: image, draw, sheet, data, doc, slide, web, publish |
| platform/extensions | The extension contract and SDK (plugin-api, plugin-sdk with the paged-plugin bin) |
| apps/editor | The editor application |
| apps/server | paged.server, the optional remote for repository-backed documents |
| tooling/ | Repository tooling, including the import that assembled this repository |
As the repository’s README describes it. Each directory keeps its own README, docs and build instructions.
Where to next
Read the evidence.
Then try the tools.
One page taken apart to its IDML, the tasks that drive the engine, and the architecture in full.
- 01 / Understand
The document model.
How frames, stories, styles and structured IDML become a precise professional page.
- 02 / Build
Developers.
Render a document, embed the viewer or the editor, automate it, extend it.
- 03 / Read
The architecture, in the docs.
How the repositories, the engine and the record fit together.