Typst
By Jason Galea · Part of the How to create a PDF benchmark
Takeaway: Typst was the strongest non-makesPDF result in our benchmark: a fast, deterministic single binary that passed both PDF/UA-1 and PDF/A-2a with CJK and colour emoji intact.
| Sample PDF | Size | Pages | Tagged | PDF/UA-1 | PDF/A-2a | Zürich / 東京 / 🚀 | Fig alt | Table tags |
|---|---|---|---|---|---|---|---|---|
| typst-default | 81 KB | 2 | yes | fail (2r / 2c) | fail (2r / 2c) | ✓ ✓ ✓ | ✓ | ✓ |
| typst-ua-1 | 81 KB | 2 | yes | PASS | fail (4r / 4c) | ✓ ✓ ✓ | ✓ | ✓ |
| typst-a-2a | 84 KB | 2 | yes | fail (2r / 2c) | PASS | ✓ ✓ ✓ | ✓ | ✓ |
| typst-ua-1+a-2a | 85 KB | 2 | yes | PASS | PASS | ✓ ✓ ✓ | ✓ | ✓ |
Checked with veraPDF 1.28.2 (r = failed rules, c = failed checks). Click any sample name to download the PDF, or test your own output in /validate (free, no sign-in) and inspect structure trees in /tags.
Typst is a modern typesetting system written in Rust, designed as a faster, saner successor to LaTeX. You write .typ markup (which includes a real scripting language), compile it with a single binary, and get a PDF back in milliseconds.
If you are comparing developer-friendly ways to generate PDFs without a headless browser, Typst is the approach worth paying closest attention to.
What we measured
We rebuilt the shared Quarterly Field Report in reference-hand.typ and compiled it with Typst 0.15.2 (via the PyPI typst package) in four modes:
typst-default.pdf(80 KB, 2 pages): Typst 0.14 (October 2025) turned tagged PDF on by default. Out of the box, it built a complete structure tree (H1/H2/H3, lists withLbl/LBody,Table/THead/TBody/TR/TH/TD,Figure/AltandLink) and only failed PDF/UA-1 on two metadata checks: missing PDF/UA identifier andViewerPreferences/DisplayDocTitle.typst-ua-1.pdf(80 KB, 2 pages,pdf_standards=['ua-1']): passed PDF/UA-1 cleanly. Failed PDF/A-2a on 4 checks.typst-a-2a.pdf(83 KB, 2 pages,pdf_standards=['a-2a']): passed PDF/A-2a cleanly. Failed PDF/UA-1 on the 2 metadata checks.typst-ua-1+a-2a.pdf(84 KB, 2 pages,pdf_standards=['ua-1', 'a-2a']): passed both PDF/UA-1 and PDF/A-2a with zero failures and no workarounds.
Every variant rendered Zürich, São Paulo, 東京, ✓, 🚀 and ✅, and every one of those survived text extraction. The whole report fit cleanly on 2 pages with proper "Page n of N" footers.
A few version notes from the Typst PDF documentation:
- When you opt into
ua-1, Typst runs accessibility checks at export time rather than letting broken files slip through silently. - PDF/UA-2 support is planned, not shipped yet (
typst-ua-1+a-2a.pdffailed 4 UA-2 rules / 7 checks, mostly structure destinations and the UA-2 namespace/identifier rules). ua-1anda-4cannot be combined, so stick toa-2awhen you want both accessibility and archiving.
Pros and cons
Pros
- Fast, deterministic, single binary with no browser and no multi-gigabyte TeX distribution.
- Passes both PDF/UA-1 and PDF/A-2a simultaneously with full CJK and colour emoji.
- Real scripting language (loops, functions, JSON/YAML/CSV data loading) built right into the markup.
- Excellent typography and maths support.
- Apache-2.0 open source; runs offline and inside air-gapped environments.
Cons
- New markup language and ecosystem for your team to learn; HTML/CSS skills don't transfer directly.
- Still a compiler binary you have to bundle, version and run yourself if you want a server-side PDF endpoint (and note it does not run natively inside a JS-only edge runtime like Cloudflare Workers without a container or external worker).
- Smaller template and AI-training footprint than HTML or Markdown, though growing fast.
When Typst is the right call
- You want a self-hosted, deterministic, compliant PDF compiler for reports, technical documentation, papers, books or data-driven documents, and you are happy learning
.typsyntax. - You need real maths typesetting alongside accessibility and PDF/A archiving.
- You cannot or do not want to send document data to a hosted API.
If you like the same deterministic, no-browser, PDF/UA-1 + PDF/A-2a shape but want a hosted HTTP API (or Markdown / JS DSL / MCP tools without running a compiler binary yourself), see makesPDF or our side-by-side Typst vs makesPDF breakdown.