mbingpdf v0.1.0

More

Benchmarks

How mbingpdf compares with three other JavaScript PDF libraries on speed and file size. The script is benchmarks/run.mjs; run it yourself with:

pnpm build
pnpm --filter mbingpdf-benchmarks bench -- --runs 3

What is measured

Three documents, built by each library from the same data with the same embedded font (Barlow Condensed, regular and bold), on A4 with 40 pt margins:

DocumentContent
InvoiceOne page: a heading, two address blocks, a table of 12 lines with a total
Table2,000 rows in 5 columns, the header repeated on every page
Text300 paragraphs of about 80 words, with a heading before every tenth

Each library uses its own table and text features as its documentation recommends: Table in mbingpdf, doc.table() in PDFKit, a table node in pdfmake, rows of View and Text in @react-pdf/renderer. The time is the median of three runs after one warm-up run, in a single Node process; the size is that of the finished file. The outputs were rendered and compared by eye: the same content in the same layout, with small differences in row height that explain the different page counts.

Results

Measured on 2026-11-10 with Node 26.12 on an Intel Core i7-8565U laptop (1.8 GHz). Versions: mbingpdf at commit 91ef2f6, PDFKit 0.17.2, pdfmake 0.2.23, @react-pdf/renderer 4.9.0.

Invoice, 1 page

LibraryTimeFile size
mbingpdf22 ms18.3 kB
PDFKit293 ms19.4 kB
pdfmake77 ms19.8 kB
@react-pdf/renderer72 ms20.4 kB

Table, 2,000 rows

LibraryTimeFile sizePages
mbingpdf1.90 s156.4 kB56
PDFKit29.10 s248.6 kB53
pdfmake1.02 s250.3 kB47
@react-pdf/renderer25.93 s313.1 kB56

Text, 300 paragraphs

LibraryTimeFile sizePages
mbingpdf468 ms80.1 kB24
PDFKit261 ms87.8 kB23
pdfmake677 ms219.7 kB24
@react-pdf/renderer1.60 s116.7 kB24

Reading the numbers

The long table is the place where mbingpdf has the most to gain; it is listed in the roadmap as follow-up work.

Edit this page on GitHub