Patent-pending spatial simulation engine

I built the layout engine so you don't have to.

VMPrint is a layout engine — not a PDF library, not a renderer. It decides where every glyph goes, negotiates page breaks, resolves spatial dependencies between dynamic regions, and hands you back a flat array of exact coordinates for every box and text run. What you do with that is up to you.

Pure TypeScript. No HarfBuzz. No headless browser. Runs in Node.js, the browser, Cloudflare Workers, and V8 isolates. The live demo below runs entirely client-side — layout engine, fonts, and PDF export included.

What makes it different

  • Single-pass TOC, index, and bibliography — no second pass, no auxiliary files.
  • Arabic, Hebrew, Thai, CJK, and Latin on the same line — no HarfBuzz, no ICU.
  • 326 pages, warm layout: 718ms. No browser process. No subprocess.
  • Every glyph's position is known data — build cursors, selection, and hit-testing from it.
  • Documents can script themselves — handlers run inside the simulation, not after it.

No second pass

TOC, indexes, and bibliographies with accurate page numbers resolved in a single deterministic simulation pass.

Runs everywhere

Node.js, browser, Cloudflare Workers, Lambda@Edge. Pure TypeScript, no native binary dependencies.

Full layout data

Every glyph's X/Y position, every box boundary, every line break — inspectable, serializable, diffable JSON.

Live Demo

Write Markdown on the left. Watch a paginated document settle on the right.

Theme presets, AST inspection, PDF export, SVG export, and live paginated layout — running entirely in the browser. Select text across the canvas and paste it. Every glyph knows where it is.

Guides

Six chapters from first document to scripting — layout config, typography, multi-column, tables, images, and document lifecycle hooks.

Read the guides

Reference

The full DocumentInput schema, scripting API, overlay system, standard fonts, and CLI reference.

Open the reference

Examples

Complete pipelines running client-side: AST to PDF, AST to canvas, Markdown transmutation, and the preview package. All work from file://.

Explore examples

Source

Engine, contexts, font managers, and transmuters on GitHub. Apache 2.0.

View the repository