Skip to content
Lamina PDF
0.9.0
GitHub
Open the web app

Choosing a PDF library for TypeScript or Rust

Which PDF library to use depends on the job: making new PDFs, reading text out of them, showing pages on screen, or changing files someone sent you. Most libraries do one or two of these jobs well. This page lists what the common TypeScript and Rust libraries do, by their own documentation, so you can pick the one that fits.

Every fact about another library links to that library’s own docs, README or registry entry, as checked on 11 November 2026. Libraries change, so follow the link before you rely on a cell. If a fact here is wrong or out of date, open an issue and we’ll correct it.

Each table has one row per library and one column per job:

  • Make: create new PDFs with text, shapes and images.
  • Read: open existing PDFs and walk their pages and objects.
  • Text: extract the text of a page.
  • Render: draw pages as images or onto a canvas.
  • Edit: change an existing PDF and save it again.
  • Forms: create form fields, or fill in the fields of an existing PDF.
  • Sign: add a digital signature, or verify one.
  • PDF/A, PDF/UA: write PDF/A, the archival standard whose files look the same in years to come, or PDF/UA, the standard for files screen readers can follow.

A cell says Yes; Partly, with a note on what’s missing; or No, when the library’s docs say it doesn’t do the job or is built for something else. A dash means its docs don’t say either way.

Library Make Read Text Render Edit Forms Sign PDF/A, PDF/UA
pdf-lib Yes Yes, not encrypted files No — Partly: pages, not their text Yes: create and fill No —
LibPDF Yes Yes Yes — Yes Yes: create and fill Partly: signs, doesn’t verify —
PDFKit Yes No No No No Partly: create only — Yes
jsPDF Yes No No No No Partly: create only — —
pdfmake Yes No No No No — — Partly: PDF/A, and PDF/UA as a flag
PDF.js No Yes Yes Yes Partly: annotations and form values Partly: fill only — No
Lamina PDF Yes Yes Yes Yes, with a renderer package Partly: document info and page rotation No No Yes

Licences, versions and runtimes, from each package’s npm entry and README:

Library Licence Latest release Runtimes its docs name
pdf-lib MIT 1.17.1, 6 November 2021 Node, browsers, Deno, React Native
LibPDF MIT 0.5.3, 16 October 2026, marked beta Node 20 or later, Bun, browsers
PDFKit MIT 0.20.2, 30 August 2026 Node, browsers
jsPDF MIT 4.2.1, 17 March 2026 Browsers, Node
pdfmake MIT 0.3.14, 8 November 2026 Node 20 or later, browsers
PDF.js Apache-2.0 6.5.438, 1 November 2026 Browsers; Node 22 or later, “mostly”
Lamina PDF MIT or Apache-2.0 0.9.0 Browsers, Node, Deno, Bun, Cloudflare Workers

A few details the tables leave out:

  • pdf-lib has had no release since November 2021, and it can’t open encrypted files. It reads the values of form fields, but no other text.
  • LibPDF describes itself as beta software whose APIs “may change between minor versions”. Its saves can append changes, which keeps existing signatures valid.
  • PDFKit, jsPDF and pdfmake make new documents only; pdfmake is built on PDFKit. For PDF/A, PDFKit needs fonts you embed, since its built-in fonts don’t meet the standard.
  • PDF.js reads and draws PDFs, mainly in the browser. It fills in forms and adds some annotations, but it doesn’t make new PDFs.
Crate Make Read Text Render Edit Forms Sign PDF/A, PDF/UA
lopdf Partly: you build the objects Yes Yes — Yes — — —
printpdf Yes Partly: experimental Partly: experimental Partly: to SVG, experimental Partly: re-save after parsing — — No: PDF/X-3 only
pdf-writer Partly: you build the objects No — — No Partly: writes new fields — Partly: you build the structure
krilla Yes Partly: embeds pages of other PDFs — — — — No Yes
hayro — Yes, not encrypted files — Yes No — — —
pdfium-render Yes Yes Yes Yes Yes Yes: fill Partly: reads signatures —
Lamina PDF Yes Yes Yes Yes, with a renderer crate Partly: document info and page rotation No No Yes

Licences, versions and what each crate needs, from crates.io and each README:

Crate Licence Latest release What it needs
lopdf MIT 0.47.0, 4 November 2026 No C library named in its docs
printpdf MIT 0.12.8, 5 September 2026 Reads PDFs through lopdf; runs in WebAssembly
pdf-writer MIT or Apache-2.0 0.15.0, 27 May 2026 Rust only, no unsafe code
krilla MIT or Apache-2.0 0.8.2, 4 June 2026 Built on pdf-writer
hayro MIT or Apache-2.0 0.9.0, 2 November 2026 Pure Rust, renders on the CPU
pdfium-render MIT or Apache-2.0 0.9.5, 1 November 2026 The PDFium C++ library, which you ship
Lamina PDF MIT or Apache-2.0 0.9.0 Pure Rust; PDFium only for the PDFium renderer

A few details the tables leave out:

  • lopdf and pdf-writer work at the level of PDF objects. You write the page dictionaries and drawing operators yourself, so you need to know the PDF format.
  • krilla checks PDF/A and PDF/UA rules it can test, and leaves the rest to you: its docs say some requirements “are semantic in nature”.
  • hayro is a renderer only: its README calls document changes “out-of-scope”. It also says untrusted files can still cause timeouts and out-of-memory errors.
  • pdfium-render gives you most of Google’s PDFium library from Rust. In return you ship a PDFium binary for each platform, and calls run one at a time, since PDFium “makes no guarantees about thread safety”.

Lamina PDF is one Rust core that makes, reads, extracts, renders and saves PDFs. It runs natively and as WebAssembly in every runtime the TypeScript table lists. It reads damaged files and reports what it repaired, saves your changes after the original bytes as an incremental save, and writes PDF/A and PDF/UA files that its tests check with veraPDF, the reference checker for PDF/A and PDF/UA. Its tests check that every runtime writes the same bytes for the same input.

It isn’t the right choice for every job today:

  • It’s at 0.x. A new minor version can still change its API; the stability policy says what each version promises and what stays fixed.
  • It doesn’t fill forms or sign. LibPDF and pdfium-render fill form fields today, and LibPDF signs.
  • Its editing is narrow. It changes document info, such as the title and author, and page rotation. It can’t yet edit the text or images already on a page.

For every operation, the reader’s capability page shows what Lamina PDF reads, writes and round-trips today in the Rust core, the TypeScript library, the web reader and the desktop app. A status appears there only when a test proves it.

To see how Lamina PDF is checked, read How we test. Benchmarks has its timings and download sizes in each runtime.

Next: Install Lamina PDF, or make your first PDF.