Skip to content
PressJetDocs Docs v0.1.0-beta.9 GitHub
Edit this page
Source docs v0.1.0-beta.9 Install v0.1.0-beta.7
On this page

Rendering engine

The Rust renderer turns a typed document tree into paginated PDF. Send a version 1 JSON document when your application owns the layout, use a template and data for repeatable layouts, or compile print-ready HTML and CSS into the same tree. The renderer runs without a browser. Use the optional WeasyPrint reference worker for its documented print profile. Native entry points · HTML compiler

From input to PDF

Stage What it does Source and verification
Parse and validate The request decoder bounds input and the layout validator checks a closed set of node types, properties and style keys. Jobs · Tree validation · Schema checks
Compile HTML The compiler parses HTML with html5ever, applies a bounded print CSS cascade and emits native nodes and diagnostics. Builder · Selectors and tests
Lay out Taffy handles Flexbox and internal grid tracks for table spans. The HTML compiler maps a subset of CSS Grid with explicit columns. Native block flow, table sizing and shaped text provide measured content. Sizes use PDF points internally. Layout · Tables · Typography
Paginate Flow content moves onto generated pages. Break controls, widow and orphan rules, repeated headers and fixed content constrain cuts. Eligible long columns lay out a bounded look-ahead window, with a full pass when the engine cannot prove the cut. Paginator and equivalence tests · Pagination guide
Paint Krilla writes pages, text, images, vector paths, links and requested tags or profiles. Native barcodes use vector marks and can interpolate page numbers. Painter · Vectors · Barcodes
Check and inspect check returns actionable findings with node paths. Development inspect reports boxes, line and page information, break decisions, font use and phase timings. Layout diagnostics · Inspection implementation · Inspection fixtures

Page design and resources

Use tables for repeated column headings and complete row groups, fixed content for running headers or footers, and page number substitutions for folios. Explicit breaks and keepTogether can constrain composition. Test oversized rows and groups using actual data. Pagination patterns · Statement example

Supply PNG or JPEG files as permitted attachments or data URLs, and use the supported SVG subset for scalable graphics. Download external resources in your application and pass them explicitly. Resource reuse reduces decoding and font parsing inside a worker but repeated image placements still count against request pixel limits. Layout, rendering, previews and uploads have separate limits. Resources · Limits · Image handling

A fixed renderer build with matching inputs, fonts and settings can generate repeatable unsigned PDF bytes. Explicit dates, timestamps, encryption, signing and version changes have their own inputs or randomness. Compare pagination, selectable text and appearance when migrating. Fidelity checks · Error handling