Skip to content
ABCrimson edited this page Mar 1, 2026 · 6 revisions

modern-pdf-lib

The PDF engine for modern JavaScript

v0.15.1 · npm · API Docs · GitHub


Quick Navigation

Guide Description
1 Getting Started Installation, first PDF, runtime examples
2 Architecture How the library is structured internally
3 Font Subsetting TrueType glyph-level subsetting engine
4 WASM Acceleration Optional WASM modules and fallback strategy
5 Text Shaping Complex script support (Arabic, Devanagari, etc.)
6 Security AES-256 encryption and digital signatures
7 Forms AcroForm fields, filling, flattening
8 Accessibility PDF/UA, structure trees, compliance checking
9 PDF-A Compliance Archival-grade PDF generation
10 Merge and Split Combining and splitting PDF documents
11 Annotations 18 annotation types with appearance generation
12 Advanced Features Layers, outlines, watermarks, redaction
13 Image Optimization JPEG recompression, deduplication, DPI analysis, CLI
14 Contributing Development setup, testing, architecture overview

At a Glance

modern-pdf-lib v0.15.1
  2,323 tests · 110 suites · 157 Rust WASM tests
  1 dependency (fflate) · ESM + CJS · TypeScript 6.0
  Node · Deno · Bun · Cloudflare Workers · Browsers

What Sets It Apart

Capability modern-pdf-lib pdf-lib
Text extraction Yes
AES-256 encryption Yes
Digital signatures Yes
PDF/A compliance Yes
Accessibility (PDF/UA) Yes
Font subsetting Yes (real glyph-level)
Complex script shaping Yes
Streaming output Yes
Annotations (18 types) Yes
Image optimization Yes (WASM JPEG)
Layers (OCG) Yes
Merge and split Yes Copy only
WASM acceleration Yes (6 modules)
Active maintenance Yes Inactive since 2021

Getting Started

Released under the MIT License · 2026

Clone this wiki locally