@reportwright/pdf

Create, comply, sign, light edit.

A streaming PDF library for Node and browsers with zero runtime dependencies. Pages are written as they end, so memory stays flat; PDF/A and PDF/UA output passes veraPDF.

npm i @reportwright/pdf
Open the playground Benchmarks GitHub npm

Where it wins

Against the JavaScript PDF libraries in the 1.0 benchmark run (GitHub Actions 38317309719, same runner, wall time from process start). Every number, and where it loses.

614 msGrouped report, 10,000 rows. pdf-lib took 23.66 s, pdfkit 6951 ms, jsPDF 1861 ms, mupdf.js (WASM) 864 ms.
8.5 msWarm invoice (median of the last 40 of 50 in one process). The next JavaScript library, mupdf.js (WASM), took 20 ms; pdfkit 88 ms; pdf-lib 114 ms.
113 msFill and flatten a form. pdf-lib took 312 ms. PDF/A-2b invoice: 185 ms against pdfkit's 432 ms, the only other JavaScript library in that row.

What it does

Write

Standard or embedded TrueType fonts (subset, kerned, any Unicode), wrapping text boxes, JPEG/PNG, canvas-style paths, gradients, links, bookmarks. Indic and Arabic through a HarfBuzz shaper you plug in.

Comply and protect

PDF/A-1b to 3a, PDF/UA-1 tagging, Factur-X / ZUGFeRD invoices, AcroForms, AES-256 encryption, PAdES signatures while streaming.

Read and edit

Load (also damaged files), merge, split, reorder, extract text, fill and flatten forms, incremental updates. Active content is stripped on read.

It does not render PDFs (use pdf.js or PDFium). For raw speed, Go and Rust writers are faster: see Benchmarks.