Benchmarks/WASM bundle size

PDF WASM bundle size benchmark

Comparing browser-deployable PDF libraries by gzipped bundle size and feature coverage. PDFluent ships a full SDK in 2.9 MB gzip — while alternatives cover only a subset of PDF operations.

Results

LibraryGzip (MB)Raw (MB)Feature coverage
PDFluent WASM2.98.1Full SDK: merge, split, render, forms, annotations, signatures, encryption
pdf-lib (JS)0.82.2Basic creation and modification only. No rendering, no forms, no XFA.
PDF.js (Mozilla)1.85Rendering and text extraction only. No editing, no merging.

Bundle sizes measured with Brotli-equivalent gzip compression at level 9. Raw = uncompressed .wasm / .js bundle.

Why does full-SDK WASM matter?

pdf-lib and PDF.js are partial solutions that require a server-side component for operations they don't support. PDFluent WASM runs entirely in the browser — no server round-trips, no backend infrastructure, no data leaving the client. At 2.9 MB gzipped, it loads in under a second on a typical broadband connection and can be cached indefinitely.

Note: These numbers are internal estimates based on pre-release builds of PDFluent and reflect the expected bundle size profile of the compiled Rust WASM target. We will publish verified bundle size numbers with reproducible build instructions at general availability. pdf-lib and PDF.js sizes are based on their published npm packages at the versions available in early 2026.

Methodology

PDFluent WASM: Compiled with wasm-pack build --release --target web. WASM binary optimised with wasm-opt -O3. Gzip size measured with gzip -9.

pdf-lib: Version 1.17.1 from npm. Single-file bundle measured after tree-shaking with Rollup.

PDF.js: Mozilla PDF.js version 4.x. Core viewer bundle (pdf.min.js) only, excluding the viewer UI.

Feature coverage: Assessed against the PDFluent public API surface. A feature is marked supported only when the library provides a documented, maintained API for it.