Most HTML-to-PDF pipelines are built on one of two things: a headless browser driven by Puppeteer, or Prince, often rented through DocRaptor. We rendered the same ten documents with Palatine, with Puppeteer and Chromium, and through the DocRaptor API, and timed each of them.
Palatine’s native, Node.js and Wasmtime figures were updated on 15 November 2026 on the same VPS, using 15 measured runs and a 96 MiB engine budget. Puppeteer, Chromium and DocRaptor retain their 13 November 2026 measurements (7 runs). The separate scaling experiment below retains its original date and build. Downloads identify the source and protocol of every target.
The short version: from a cold start, Palatine delivers an invoice 16× sooner than Chromium and is faster on most of the corpus. Once both are running, Chromium is faster on 4 of the 10 documents, and by a wide margin on a report made of tables. The original scaling experiment found Prince faster than the Palatine build tested then on both documents, but with DocRaptor you mostly wait for the service, not for Prince. The rest of this page gives the numbers, how they were taken and where they stop being comparable. Download every sample, version and file hash.
What was measured
The documents are the ten fixtures of our performance corpus: an invoice, a web page, a long article, a table-heavy report, an image album, a page of advanced CSS, a short report, a book, a book with footnotes and a dictionary with running headers. Each one is rendered to PDF with the same HTML and the same font, Noto Sans. Everything ran on one Linux server: AMD EPYC Processor (with IBPB), 6 cores, 11.7 GiB of memory. Palatine figures use 15 runs; the retained competitor figures use 7.
A time only means something with its boundaries, so there are three groups:
- One conversion, from nothing. A new process for every document, timed from start to exit. For Palatine this is the native command-line build, and the WebAssembly build inside Wasmtime. For Chromium it is a Node.js script that imports Puppeteer, launches the browser, opens a page, loads the file, calls
page.pdf(), writes the result and closes the browser. This is the cost of a serverless function, a queue worker that scales to zero, or a script. - The next document, on a service that stays up. Palatine’s WebAssembly build in Node.js, timed around
renderer.render()on a renderer that is already created. For Chromium, a browser that is already open: new page, load,page.pdf(). Palatine gets 16 warm-up renders first; the retained Chromium run used 5. - A hosted API. DocRaptor’s synchronous endpoint, timed from the request to the last byte of the PDF, over a connection that is already open.
1 PDF page in Palatine. Palatine: 15 runs, 15 November 2026. Other engines: 7 runs, 13 November 2026. Shorter is better.
One conversion, from nothing
A new process for each document: start, load, render, write.
The next document, on a service that stays up
Engine or browser already running and warmed up.
Hosted API
Round trip from our server to DocRaptor, fonts included in the request.
Starting from nothing
A one-page invoice takes 57 ms with Palatine’s native build and 909 ms with Puppeteer and Chromium: 16× longer. Chromium spends a median of 456 ms launching before it has seen the document; that part does not depend on what you print.
Palatine’s native build is faster on 9 of the 10 documents, by up to 16× on the invoice. Palatine is slower on the table-heavy report: 1.98 s against 1.79 s, where rendering takes long enough to outweigh the browser’s launch.
The WebAssembly build in Wasmtime pays for instantiating a 22.5 MiB module on every run. It is faster than cold Chromium on 6 documents, level on 1 and slower on 3. Its compilation cache was primed; the very first run on a machine compiles the module and took 6.64 s here.
| Document | Palatine native | Palatine WASM, Wasmtime | Puppeteer + Chromium |
|---|---|---|---|
| Invoice | 57 | 332 | 909 |
| Web page | 172 | 559 | 1,129 |
| Long article | 717 | 965 | 1,192 |
| Table-heavy report | 1,976 | 2,700 | 1,794 |
| Image album | 501 | 1,277 | 1,320 |
| Advanced layout | 759 | 1,644 | 1,313 |
| Short report | 177 | 496 | 1,128 |
| Book | 844 | 1,373 | 1,214 |
| Book with footnotes | 372 | 703 | 1,194 |
| Running-header dictionary | 68 | 319 | 984 |
A service that stays up
Once both are running, the picture changes. Palatine is still faster on 5 documents, the short ones first: the invoice takes 35 ms against 196 ms. But a warm Chromium is faster on 4 of the 10 documents, level on 1, and the gap is widest on the table-heavy report: 1.08 s for Chromium, 1.78 s for Palatine, 1.7× longer.
We are not surprised by the direction. Chromium’s layout engine has had many more years of optimization than ours, and it spreads its work over several processes. Tables are the slowest part of Palatine on this corpus, and automatic hyphenation of the long article is another known cost. If your documents are long reports and you already operate a browser pool, Chromium will produce them sooner.
| Document | Palatine WASM, Node.js | Puppeteer + Chromium |
|---|---|---|
| Invoice | 35 | 196 |
| Web page | 206 | 536 |
| Long article | 488 | 432 |
| Table-heavy report | 1,782 | 1,076 |
| Image album | 629 | 653 |
| Advanced layout | 981 | 704 |
| Short report | 157 | 359 |
| Book | 770 | 526 |
| Book with footnotes | 321 | 460 |
| Running-header dictionary | 43 | 227 |
These two groups have different boundaries. The first includes starting a process and reading files; the second does not. Compare engines inside a group, then pick the group that matches how you deploy.
The engines do not print the same pages
A faster result is only better if it is the same document. Every PDF was parsed after the run: page count, extracted text, embedded font. The text matches closely, the pages do not always:
| Document | Palatine | Chromium | Prince |
|---|---|---|---|
| Invoice | 1 | 1 | 1 |
| Web page | 2 | 2 | 3 |
| Long article | 25 | 26 | 25 |
| Table-heavy report | 28 | 28 | 28 |
| Image album | 8 | 8 | 23 |
| Advanced layout | 15 | 13 | 18 |
| Short report | 24 | 24 | 24 |
| Book | 106 | 104 | 107 |
| Book with footnotes | 48 | 47 | 48 |
| Running-header dictionary | 4 | 4 | 4 |
- Chromium does less on two documents. It has no footnotes and no running headers taken from the text (
string-set). The book with footnotes is printed with its notes in the flow, and the dictionary’s page headers stay empty: its PDF holds 99.5% of the text for the book with footnotes and 89.1% of the text for the running-header dictionary. Palatine and Prince lay both out as written. - The book uses Knuth–Plass in Palatine only. The fixture asks for it, and it costs time that the two other engines do not spend: they break lines one at a time.
- The web page and the long article are paginated here. In our own corpus they are single continuous pages, which neither Chromium nor Prince produces. For this comparison they get a page of their viewport size and no margins, in all three engines.
- Page counts differ on the web page, long article, image album, advanced layout, book and book with footnotes. Line breaking, hyphenation and the support of grid and multi-column layout are not identical between engines. We report the counts and did not tune the documents to make them agree.
DocRaptor, and what it says about Prince
We did not run Prince ourselves: it is measured through DocRaptor, which runs Prince 15.1. A round trip took between 2.39 s and 3.20 s depending on the document. Palatine’s native build, run locally, finishes before the DocRaptor response arrives on 10 of the 10 documents.
That round trip is not Prince’s rendering time, and it would be unfair to present it as such. Three things are in it:
- The network. DocRaptor’s response carries an
x-runtimeheader: the time spent on their server. Subtracting it from the round trip leaves between 633 and 1,208 ms outside their server. Most of that is the upload. A request has to carry its fonts, 1.7 MiB here, and our server is far from theirs: a new connection takes 225 ms to open, before TLS. A request of 195 bytes leaves only 125 ms outside. - The service. A document that contains a single word still takes 1.53 s on their server. Whatever the service does around Prince, such as queueing the job, starting it and storing the result, costs that much before any layout happens.
- Prince. What is left.
To isolate that last part, every document request was preceded by a control request: the one-word document, padded with a comment to the same size. Both travel the same way and cost the service the same. The difference between their server times should be what Prince spent on the document itself.
| Document | Round trip | Server | Control, server | Difference | Palatine native |
|---|---|---|---|---|---|
| Invoice | 2,568 | 1,576 | 1,745 | −169 | 57 |
| Web page | 3,071 | 1,803 | 1,632 | +171 | 172 |
| Long article | 2,387 | 1,765 | 1,771 | −6 | 717 |
| Table-heavy report | 2,659 | 1,832 | 1,824 | +7 | 1,976 |
| Image album | 2,934 | 1,686 | 1,693 | −6 | 501 |
| Advanced layout | 3,202 | 2,430 | 1,622 | +808 | 759 |
| Short report | 2,710 | 1,611 | 1,601 | +10 | 177 |
| Book | 2,671 | 1,705 | 1,652 | +53 | 844 |
| Book with footnotes | 2,414 | 1,792 | 1,567 | +225 | 372 |
| Running-header dictionary | 2,431 | 1,719 | 1,831 | −113 | 68 |
This did not work, and it is worth saying why. The ten controls ask for the same work, yet their medians spread over 264 ms, and the difference is smaller than that for 9 of the 10 documents. The server times are not smooth either: the same request sometimes takes a second longer than the time before. One request tells us that Prince finished somewhere inside the service’s first second and a half, and nothing more precise.
Asking for more pages — historical scaling experiment
These scaling figures retain the 13 November 2026 experiment, including its older Palatine build. They are separate from the updated single-document Palatine measurements above; the Prince and DocRaptor measurements are unchanged.
What a fixed cost cannot hide is growth. We repeated the body of two documents 1, 4, 8 and 16 times and sent each version to DocRaptor 3 times, then rendered the same files with Palatine’s native build. The slope of the time against the number of copies is what one more copy costs, with every fixed cost removed. A copy is 28 pages of the table-heavy report in Prince and 107 pages of the book in Prince.
| Document and engine | Per copy | Per page | ×1 | ×4 | ×8 | ×16 |
|---|---|---|---|---|---|---|
| Table-heavy report · Prince through DocRaptor | 341 | 12.2 | 1,572 | 2,706 | 3,620 | 6,762 |
| Table-heavy report · Palatine native | 5,180 | 185 | 4,976 | 20,729 | 40,739 | 82,796 |
| Book · Prince through DocRaptor | 362 | 3.4 | 1,570 | 2,521 | 3,673 | 6,990 |
| Book · Palatine native, Knuth–Plass | 1,327 | 12.5 | 1,449 | 4,802 | 10,092 | 21,172 |
| Book · Palatine native, line by line | 1,208 | 11 | 1,031 | 4,557 | 8,849 | 19,163 |
For Prince, the slope still contains what the service does in proportion to the document, such as receiving it and storing the PDF. It is an upper bound: Prince itself needs at most that.
- Table-heavy report. One more copy costs Prince at most 341 ms and Palatine 5.18 s. Prince is at least 15× faster.
- Book. One more copy costs Prince at most 362 ms and Palatine 1.33 s, or 1.21 s when Palatine breaks lines one at a time as Prince does. Prince is at least 3.3× faster on equal terms.
In that scaling experiment, Prince was clearly faster than the Palatine build tested, with a wide gap on tables. What you wait for with DocRaptor is something else: the service’s fixed cost and the network, which are the same for an invoice and for a book. That is why a local Palatine render still comes back before DocRaptor’s answer on most single documents, and why the order reverses once a document is long enough.
These figures have limits. Documents were sent in DocRaptor’s test mode, which is free and adds a watermark; we did not verify that paid requests are queued the same way. Everything was measured from one server, at one time of day. And it is an inference from timings, not a run of Prince on our hardware.
What you deploy
Speed is one side of the choice. Palatine’s native build is one 26.5 MiB file, and the WebAssembly build for Node.js and browsers is 12.1 MiB. The Chromium build measured here is a 260.7 MiB directory, and Node.js comes on top. Chromium also needs a sandbox or the decision to turn it off, a process to supervise, and somewhere to run that is not an edge worker or the user’s own browser tab.
Chromium gives you something Palatine does not: the whole web platform, JavaScript included. If your document is a web application that happens to need printing, use the browser. If it is a document — an invoice, a report, a book — the engines differ in what they can express on paper: footnotes, running headers and cross-references are in Palatine and Prince, not in Chromium.
Reproduce the measurements
The benchmark is in the repository, with the corpus. The updated Palatine engine is commit be3e7ec7. Each target below records its measurement date and number of timed samples; the retained competitor and scaling records identify their original versions.
| Target | Version | Timed |
|---|---|---|
| Palatine native | native C++ CLI 2026-11-15 · 15 samples | complete CLI process |
| Palatine WASM in Wasmtime | wasmtime 50.0.1 (c307ec81d 2026-10-29) Cranelift, on-disk compilation cache 2026-11-15 · 15 samples | complete CLI process, compilation cache primed |
| Palatine WASM in Node.js | Node v26.13.1 2026-11-15 · 15 samples | renderer.render() on an initialized renderer, one process per document |
| Puppeteer + Chromium, cold | puppeteer-core 25.17.0, HeadlessChrome/151.0.7922.34 chrome-headless-shell, --no-sandbox 2026-11-13 · 7 samples | complete Node process: import, browser launch, page, load, page.pdf(), write, close |
| Puppeteer + Chromium, warm | puppeteer-core 25.17.0, HeadlessChrome/151.0.7922.34 chrome-headless-shell, --no-sandbox 2026-11-13 · 7 samples | new page, load and page.pdf() in a browser kept open, one browser per document |
| Prince through DocRaptor | Prince 15.1 (www.princexml.com) 2026-11-13 · 7 samples | HTTPS round trip of the synchronous API from this machine, connection kept alive |
# Build the native, WASI and Emscripten targets first (docs/BUILD.md, docs/WASI.md).
# Refresh Palatine only, on the same machine as the retained competitor run:
bun run bench:engines -- --targets native,wasmtime,node --iterations 15 --warmup 16 --max-memory 100663296
# The download retains the original Chromium and DocRaptor samples.
# The historical scaling experiment is dated separately. Some choices favour Chromium, on purpose. It runs as chrome-headless-shell, its fastest mode, and without its sandbox, as it does in most containers. In Chromium’s default headless mode the same invoice took 1,644 ms cold and 421 ms warm; that run is in the download too. The font is read from a local file, like Palatine’s. The warm case opens a new page for each document, which is how a service keeps documents apart.
Other choices limit what the numbers say. This is one shared server, and other work was running on it: individual samples vary, which is why the download keeps all of them. Nothing here measures concurrent requests, memory, or documents that load resources from the network. Palatine’s hosted API is not part of this comparison. Run your own documents on your own hardware before you size a service; the script takes a --filter.
Download the complete results · Browse the benchmark corpus · Palatine across runtimes · Palatine vs PrinceXML