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.
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.
- github commitsLastYear: 0, compared with 167 to 3,189 for maintained peers
- github.com/Hopding/pdf-lib/issues/1423: Users move to @cantoo/pdf-lib
- polotno.com/sdk/product/compare/javascript-pdf-libraries-compared: Notes the last release from 2021 and points to the fork
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.
- github.com/Hopding/pdf-lib/blob/v1.17.1/README.md: Shows the editing API and its limits.
- pdfkit.org: Documents layout features for complex PDF generation.
- github.com/mozilla/pdf.js: Documents a dedicated PDF parser and viewer.
- npm latestPublishedAt and github commitsLastYear: The last release was in November 2021, with zero commits in the past year.
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.
- github description: Create and modify PDF documents in any JavaScript environment
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Recommended mainly for modifying, merging and form-filling PDFs
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.
- github.com/Hopding/pdf-lib/blob/v1.17.1/README.md: Documents runtime support, forms, page copying, and reading limits.
- 2025.stateofjs.com/en-US/other-tools: Provides no PDF editing demand figures.
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.
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Manual pagination and tables; non-Latin text needs embedded fonts; small bundle
- documenso.com/blog/introducing-libpdf-the-pdf-library-typescript-deserves: Praises the pdf-lib API but built a replacement for its gaps
- github openIssues: 279 open issues with no maintainer triage
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.
- github.com/Hopding/pdf-lib/blob/v1.17.1/README.md: Shows editing examples and the encrypted-document error.
- npm hasTypes: The npm package ships TypeScript declarations.
- github.com/jddelia/filemorf-lab: Reproducible merge timings across Node.js and three browser engines.
- reddit.com/r/javascript/comments/1qlgpra/introducing_libpdf_the_pdf_library_for_typescript: A user reports inconsistent checkbox appearances across viewers.
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.
- npm latestPublishedAt: 2021-11-06, no versions in the last year
- scorecard Maintained: Score 0
- github.com/Hopding/pdf-lib/issues/1423: Is-it-maintained issue with no maintainer reply; users point to @cantoo/pdf-lib
- news.ycombinator.com/item?id=46943865: 2026 thread: unmaintained for 4+ years, commenters suggest forking
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.
- github commitsLastYear and openPullRequests: Zero commits and 41 open pull requests.
- github.com/Hopding/pdf-lib/releases/tag/v1.17.1: GitHub still marks the November 2021 release as latest.
- github.com/Hopding/pdf-lib/blob/master/docs/MAINTAINERSHIP.md: One principal maintainer describes handling releases.
- github.com/Hopding/pdf-lib/pulls: Open contributions include proposed fixes to form handling.
- peers latestPublishedAt: All eight listed peers published during 2026.
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.
- pkgpulse.com/guides/pdf-lib-vs-jspdf-vs-pdfmake-pdf-generation-nodejs-2026: Independent guide recommends it for editing PDFs
- documenso.com/blog/introducing-libpdf-the-pdf-library-typescript-deserves: Former go-to library of Documenso, now replaced by LibPDF
- nutrient.io/blog/top-js-pdf-libraries: Listed among top JS PDF libraries, in a vendor blog
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.
- raw.githubusercontent.com/OpenSignLabs/OpenSign/staging/apps/OpenSign/package.json: OpenSign declares pdf-lib as an application dependency.
- support.bigfix.com/product/documents/opensource/Notices_BigFix_Mobile_V11_Jan2026.pdf: BigFix Mobile lists the original pdf-lib 1.17.1 package.
- github.com/jddelia/filemorf-lab/blob/main/vendor/pdf-converters.ts: Publishes FileMorf's production browser editing code.
- pdfsdoctor.com/blog/open-source-pdf-libraries-compared-benchmark: Independent 50-file merge test found the smallest output with pdf-lib.
- 2025.stateofjs.com/en-US/libraries: Offers no pdf-lib satisfaction or retention measure.
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.
- npm license and dependencies: MIT licence and four direct runtime dependencies.
- advisories: The OSV snapshot lists zero advisories for pdf-lib.
- scorecard: 3 out of 10, with weak release and security controls.
- raw.githubusercontent.com/Hopding/pdf-lib/v1.17.1/package.json: Release scripts publish directly through Yarn.
- github.com/Hopding/pdf-lib/blob/master/docs/MAINTAINERSHIP.md: The principal maintainer describes a manual release process.
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
- 8.7PDF.js
- 7.6PDFKit
- 7.4React-PDF viewer
- 7.4unpdf
- 7.3React-pdf renderer
- 7.2pdfmake
- 6.9pdfme
- 6.4jsPDF
- 4.9pdf-lib