Elestia Open Source Ratings
4.9

pdf-lib

Keep, but not for new work. 9th of 9 PDF libraries.

pdf-lib is a pure TypeScript library that creates and edits PDFs in Node, browsers, Deno and edge runtimes. Its API is still well liked, but there has been no release since November 2021 and no maintainer has answered issues in years. Keep it where it already runs. For new work, pick the maintained drop-in fork @cantoo/pdf-lib, or Documenso's LibPDF if you accept a beta.

Best for: Existing codebases that already use it for merging, splitting, stamping or form-filling PDFs and cannot migrate yet.

WebsiteGitHubnpm

Scores

Overall4.9

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

The API is still good at editing PDFs, but there has been no release in 5 years and nobody handles issues. That makes it a poor base for new work. The drop-in fork @cantoo/pdf-lib keeps the same API and is still released. For new documents, PDFKit, pdfmake and jsPDF are maintained, and PDF.js or unpdf handle reading.

GPT-6.2 Sol: 5.8, likely 4.5 to 7.0

pdf-lib remains a reasonable choice for editing existing, unencrypted PDFs, especially when the team controls the input files. PDFKit is a stronger choice for generating complex documents, and PDF.js is a stronger choice for viewing and reading page text. The long release gap weighs heavily for new projects, and the fit depends on how varied the input files are and how much the team needs upstream fixes.

Needed by many4.8

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Many web and back-end projects need to create or edit PDFs at some point, but not most projects. pdf-lib covers creating and editing, not reading text or showing pages. So it serves part of the category's job, though on any runtime.

GPT-6.2 Sol: 4.5, likely 3.2 to 5.8

PDF editing serves teams that build document workflows, such as filling forms, assembling reports, or adding watermarks. Browser and Node.js support broaden its audience, while viewing and text extraction require another tool. Available developer survey data gives no direct estimate of how often teams need these editing features.

Helps a lot6.7

How well does it do the job for those who need it?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

The API is clean and typed. It is one of the few JS tools that edits existing PDFs and fills forms. But it has no text extraction, no encryption and no automatic layout, and parsing bugs stay unfixed. Documenso, a long-time user, reports that its own LibPDF loads PDFs much faster and saves incrementally, which keeps signatures valid. The range is wide because those claims come from the project itself.

GPT-6.2 Sol: 7.4, likely 6.2 to 8.5

Version 1.17.1 handles page copying, stamping, and form flattening through a typed API with examples that developers and coding agents can follow. Independent tests show fast merges on simple fixtures, and the library reports encrypted input with a dedicated error. A user reported checkbox appearances that differed across viewers, and the library lacks rendering and page text extraction. Performance on complex files and coding-agent accuracy have little direct measurement.

Holds up over time2.0

Will it still be a good choice in two years?

Claude Opus 5.5: 1.5, likely 0.5 to 3.0

The last release was in November 2021 and there were no commits in the last year. An issue from 2023 that asks if the project is maintained has no answer from a maintainer. A Hacker News thread in 2026 found the author inactive for more than 4 years. Users are moving to the Cantoo fork and to LibPDF.

GPT-6.2 Sol: 2.5, likely 1.4 to 3.7

The last release shipped in 2021, and the repository recorded zero commits in the past year while every listed peer published a release. The project documents a release process centered on one principal maintainer, and dozens of pull requests remain open. The existing API can keep serving stable workflows, but a return to regular upstream patches remains uncertain.

Used widely6.2

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 5.5 to 8.0

It had 124.7M downloads in the last 4 weeks, 14.8 times the same weeks a year before. That is well above the 4.1 median, but most of the jump is probably installs pulled in by other tools, not direct choices. Its 2,364 dependent repos are about a tenth of what PDFKit, jsPDF and pdfmake have. So direct adoption is solid but smaller than the download count suggests.

  • npm downloadsLast4Weeks: 124.7M, compared with 8.4M a year earlier
  • dependents repos: 2,364, compared with about 22k for PDFKit, jsPDF and pdfmake
  • github stars: 8.7k stars

GPT-6.2 Sol: 5.3, likely 3.8 to 6.7

Downloads rose from 8.4 million to 124.7 million in the comparable four-week windows, about 14.8 times and well above the 4.1 times catalog median. The 2,364 tracked dependent repositories trail PDFKit and jsPDF by roughly an order of magnitude, and the five Bluesky posts show little organic discussion. Automated and transitive installs can inflate the growth figure, while CDN installs are missed and repository coverage is incomplete, so direct adoption remains hard to size.

  • npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo: Install volume grew about 14.8 times year over year.
  • medianDownloadsRatio: The catalog-wide median was 4.1 times.
  • dependents and peers dependentRepos: 2,364 tracked repositories and 363 packages, with much larger repository counts for PDFKit and jsPDF.
  • bluesky: Five posts, largely automated or promotional, with zero likes.
  • github stars: 8,691 stars, below most listed peers.
  • github.com/Hopding/pdf-lib/blob/v1.17.1/README.md#umd-module: Documents browser loading through two CDNs.
Vouched for5.5

Who stands behind it being good?

Claude Opus 5.5: 4.5, likely 3.0 to 6.0

Independent comparisons still name it as the tool to pick for editing PDFs, and Documenso ran it in production for years. But current sources pair that advice with warnings about maintenance, and its best-known production user has built a replacement. No developer surveys rate it.

GPT-6.2 Sol: 6.4, likely 5.2 to 7.7

OpenSign declares pdf-lib directly, BigFix Mobile lists version 1.17.1 in its shipped software notices, and FileMorf publishes the code it uses for browser editing. An independent merge comparison also found that pdf-lib produced the smallest output in its 50-file test. The available survey lacks a pdf-lib satisfaction measure, and the benchmarks cover a limited set of files.

Safe5.0

How safe is it to depend on?

Claude Opus 5.5: 5.0, likely 3.5 to 6.5

It has no advisories, an MIT licence and only 4 dependencies. But the OpenSSF Scorecard is 3, with no security policy, no signed releases and no SAST. Parsing bugs in code that reads untrusted PDFs will not be fixed. Publishing rests with one inactive owner, which adds supply-chain risk.

  • advisories total: 0 advisories
  • scorecard score: 3/10; Security-Policy, Signed-Releases and SAST all 0
  • npm dependencies: 4 dependencies
  • news.ycombinator.com/item?id=46943865: Concerns about the inactive author and the project's future

GPT-6.2 Sol: 5.0, likely 3.6 to 6.4

The package has a permissive MIT licence, four direct dependencies, and zero advisories in the supplied OSV record. OpenSSF scored it 3 out of 10, with zeroes for signed releases, token permissions, fuzzing, and its security policy. The release process documents manual publishing led by the principal maintainer. Years without a release make the response to a future security report hard to predict.

Good

  • It edits existing PDFs: merging, splitting, copying pages, filling forms and stamping text and images, which few JS peers do.
  • Pure TypeScript with only 4 dependencies, so it runs the same in Node, browsers, Deno and workers.
  • Its clean, well-typed API is easy for people and AI agents to use, and there are many examples online.
  • MIT licence and no published security advisories.

Bad

  • No release since v1.17.1 in November 2021, and no commits in the last year.
  • 279 open issues and 41 open pull requests, with no maintainer answers; known bugs with unusual or damaged PDFs stay unfixed.
  • It cannot extract text, render pages or handle encryption, and it has no automatic layout or pagination.
  • The original package has one inactive owner, so its future and its publish rights are uncertain.

The numbers

npm downloads, 4 weeks
125M ×15 in a year
GitHub stars
8.7k
Commits, 12 months
0
npm version
1.17.1 Nov 2021
Versions, 12 months
0
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
3.0 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (Hopding/pdf-lib), npm (pdf-lib), OSV and the OpenSSF Scorecard.

PDF libraries

  1. 8.7PDF.js
  2. 7.6PDFKit
  3. 7.4React-PDF viewer
  4. 7.4unpdf
  5. 7.3React-pdf renderer
  6. 7.2pdfmake
  7. 6.9pdfme
  8. 6.4jsPDF
  9. 4.9pdf-lib
Compare all 9 on six scores