Blog
HTML to PDF vs. a Typesetting Engine: How Your Documents Get Rendered, and Why It Matters
Nearly every HTML to PDF API on the market is a headless browser running "print to PDF" on a server, and every property of the documents it produces, fidelity, speed, pagination, and accessibility, is inherited from that one architectural choice. A team searching for "html to pdf" is rarely shopping for HTML. The team is shopping for documents generated from data, invoices, statements, contracts, reports, and HTML happens to be the hammer the team already knows. The real decision is not which HTML to PDF API to pick. The real decision is what class of engine renders your documents: a browser emulating print, or a typesetting engine built for pages. For transparency up front: JetPage is built on a typesetting engine, so this article argues a position, but every competitor claim in it is sourced and every concession to the browser is genuine.
What an HTML to PDF API actually is under the hood
An HTML to PDF API is, in almost every case, a browser in disguise. The service loads your HTML into headless Chromium (driven by Puppeteer or Playwright) or into the older wkhtmltopdf WebKit engine, waits for the page to render, and calls the browser's print-to-PDF function. APITemplate.io runs on a headless browser by its own architecture. PDFMonkey renders through headless Chrome. Teams that build the pipeline themselves with Puppeteer operate the same machinery without the API wrapper. There is nothing dishonest about this design, but there is something worth understanding: a browser is a magnificent engine for rendering interactive screens, and PDF output is a print-emulation side feature bolted onto that engine, not the job the engine was built for.
When HTML to PDF is the right tool
A headless browser is the correct choice for some jobs, and an honest comparison starts there. Archiving an existing web page as a PDF is a browser job, because the page already lives in browser layout. One-off exports of content already built in HTML, a dashboard snapshot, a rendered article, belong to the browser for the same reason. A team with deep CSS investment, low document volume, and no accessibility obligations loses little by printing through Chromium. The problems below appear when the job changes from "capture this web page" to "generate thousands of paginated, machine-readable documents from data." That second job is the one most teams searching for an HTML to PDF API actually have.
Failure mode 1: the preview is not the PDF
The screen rendering and the print rendering of the same HTML are two different outputs, and the gap between them is the most common complaint about the HTML to PDF class. Screens have viewports; pages have fixed boxes. Fonts available on a developer machine differ from fonts on the render server. Lazy-loaded images race the print call. A Chromium version bump on the server shifts line breaks that looked stable for months. The market has a shorthand for this failure mode: preview ≠ PDF, and APITemplate.io, as a headless-browser service, inherits exactly that trade-off. JetPage closes the gap architecturally rather than by tuning: the preview pane in the JetPage builder is produced by the same typesetting engine, the same fonts, and the same layout logic that produce the final PDF, so the preview is the PDF, and automated visual regression tests keep that fidelity from drifting between releases.
Failure mode 2: pagination is an afterthought
A browser thinks in one infinite scroll; a document thinks in pages. CSS Paged Media is the standard written to patch that mismatch, and browser support for it remains notoriously partial: repeating table headers across page breaks, keeping a block together on one page, running headers and footers, and page numbers all sit in the weakly supported corner of Chromium's print pipeline. The strongest proof that pagination needs a real engine comes from inside the HTML to PDF market itself: DocRaptor built its entire product on PrinceXML, a genuine typesetting engine with strong CSS Paged Media support, precisely because a browser could not deliver print-grade pagination. PrinceXML has sold that distinction since 2005, so the browser-versus-engine divide is not a framing JetPage invented. JetPage treats pagination as native engine behavior: automatic page breaks, repeating headers, and long-document layout are what a typesetting engine does by default, demonstrated on a 40-page statement with repeating table headers.
Failure mode 3: seconds per document
Rendering a PDF through a browser means paying for browser startup, page load, asset fetching, and print emulation on every document, and that pipeline costs seconds per document across the headless-browser class. Seconds per document is invisible at ten invoices a day and becomes a wall at ten thousand, when a nightly billing run stretches into hours and a burst of statement requests queues behind a pool of browser instances. A typesetting engine skips the browser lifecycle entirely: JetPage compiles documents in milliseconds and generates thousands of PDFs per second at high volume, because the engine lays out pages directly from the template and data instead of emulating a screen first.
Failure mode 4: accessibility is only as good as the print pipeline
Browsers can emit tagged PDFs, and precision matters here. Chromium has exported tagged PDFs since Chrome 85 in 2020, as described on the Chromium blog, and the tag quality mirrors whatever semantics the source HTML happens to contain. The PDF Association's analysis of Chrome's PDF output notes that nothing in the export guarantees PDF/UA conformance: the print pipeline enforces no structure, no reading order, and no alternative text, so a sloppy template silently produces a sloppy tag tree. At the product level the gap is wider: APITemplate.io and PDFMonkey publish no accessibility offering at all, while DocRaptor, through PrinceXML, deserves credit as the exception in the HTML-input world with WCAG and Section 508 capable output. JetPage makes tagged, accessible PDFs the default on every plan and enforces alternative text on every image at design time, which is the posture the European Accessibility Act now expects from customer-facing documents. Any team can check its current output in seconds with the free accessible PDF checker.
What a typesetting engine is
A typesetting engine is the class of software that produces books and scientific publications: an engine whose native model is the page, not the screen. A typesetting engine knows the exact box of every glyph before output, embeds and subsets fonts deterministically, breaks pages by rule rather than by print emulation, and knows the structure of the document at layout time, which is why tagging, speed, and reproducible output come naturally instead of as patches. The four failure modes above share one root: a browser learns about pages last, at print time, while a typesetting engine knows about pages first. The honest taxonomy of the market looks like this:
| Approach | How it renders | Examples | Fits best |
|---|---|---|---|
| Headless browser | Screen layout, then print emulation | APITemplate.io, PDFMonkey, DIY Puppeteer | Capturing existing web content, low volume |
| Typesetting engine, code-driven | Native page layout from HTML/CSS you write | PrinceXML (sold as DocRaptor) | Developer teams wanting print-grade CSS |
| Typesetting engine, visual builder | Native page layout from a visual template plus JSON data | JetPage | Data-driven documents without template code |
JetPage occupies one cell of that table, not the whole table. Teams that want to hand-write CSS against a real engine are well served by DocRaptor. Teams whose documents start life as web pages are well served by a browser.
How to choose: a decision checklist
Choose a headless browser when the content already exists as a web page, volume is low, the preview only needs to be close, and no regulation requires machine-readable output. Choose a typesetting engine when documents are generated from data, when page count is unpredictable and pagination must hold, when volume is measured in thousands, when the preview must be exact, or when tagged output is a compliance requirement rather than a nice-to-have. Teams generating invoices from application data sit squarely in the second column, which is the use case JetPage was built for: design the template visually, watch the exact preview update as you edit, then render through the API. For a product-by-product view of how JetPage compares with the tools named above, the comparison hub covers every major alternative.