Pressjet
← All articles
Performance

What does a 17-page invoice cost to print?

Read wall time, CPU, memory and PDF size together before you choose a renderer.

A customer downloading an invoice experiences elapsed time. A team paying for a fleet of workers also cares how long the CPU stays busy, how much memory each service occupies and how many bytes it sends. A single “fastest” score hides three of those decisions.

Follow the request all the way back

The 500-item benchmark timed a warm HTTP request through receipt of the final PDF. All renderers handled the same items and amounts on one logical CPU, with a 1 GiB budget per deployment. Each configuration ran 21 measured requests in rotating order. Pressjet served JSON and HTML from one API container with one worker; HTML was compiled by the native engine. Here are the published medians for the 17-page invoice.

500 invoice items · one warm client
Renderer HTTP (ms) CPU (ms) Peak RAM¹ (MiB)
Pressjet JSON 30.88 30.29 27.53
Pressjet HTML 53.82 53.39 27.34
jsPDF 82.12 80.69 48.63
Gotenberg 344.16 343.41 456.28
Browserless 584.34 550.95 810.52
dompdf² 694.65 691.15 100.38
WeasyPrint 1,730.39 1,689.33 107.86
react-pdf 1,739.83 1,709.27 129.32

¹ Median of the observed per-request peaks. The sampler read container memory every 5 ms, including the service, its children and charged file cache. Short spikes can fall between samples. ² dompdf laid the invoice out on 18 pages.

Match the test to the buying decision

If the app owns structured invoice data, the native tree is a reasonable input. If the team maintains print stylesheets, compare the HTML endpoint with the HTML services. The jsPDF adapter uses structured data and AutoTable, and the react-pdf adapter builds React components. The resulting files also differed. jsPDF produced a 357.4 KiB invoice, dompdf 32.9 KiB and react-pdf 48.7 KiB. Pressjet JSON produced 63.3 KiB and Pressjet HTML 70.7 KiB. Font embedding and tagging choices affect the bytes customers download.

For a production trial, use one representative document from each size band and validate its totals before timing it. Record the median and the tail separately. Then run the actual number of simultaneous exports your service expects at billing time. The single-client figures above give you a starting point for that experiment. Queueing under a month-end burst is a separate measurement.

Interactive comparison · Measured medians · Reproduction procedure

Read nextPut Export PDF inside a Node appAll articles ↗