# PDFKit: 7.6 out of 10

A strong pick. 2nd of 9 in [PDF libraries](https://elestia.ai/opensource/pdf/index.md).

PDFKit is a mature, low-level JavaScript library for making PDFs from code in Node and the browser. It is actively maintained and recently added tables, forms and PDF/UA tagging. It is a strong pick for building documents with full control, but it cannot read or edit existing PDFs, and its types come from a separate @types package.

**Best for:** Node developers who want exact, code-driven control over PDFs they make from scratch, such as invoices, reports and accessible tagged documents.

## Scores

- **Overall: 7.6** (likely 6.5 to 8.5)
  - Claude Opus 5.5 (7.0): PDFKit is a strong, actively maintained choice for code-driven PDF generation, and it is the engine under pdfmake. For declarative documents, pdfmake or React-pdf need less code. It is no help for reading or editing existing PDFs. The lack of bundled types and the 0.x breaking changes hold it back from the top tier.
  - GPT-6.2 Sol (8.1): PDFKit is a strong choice for new Node.js projects that generate documents from code, especially when page placement and streamed output matter. Pick pdfmake for declarative reports with complex layouts or PDF.js for viewing existing files. Recent maintenance and downstream adoption support the score, while browser setup and upgrade friction keep it short of a category-wide default.
- **Needed by many: 4.8** (likely 3.6 to 6.0)
  - Claude Opus 5.5 (5.0): Making PDFs, such as invoices, reports and exports, is a common need in business web apps, but not in most projects. PDFKit covers only the "make" part of the category's job, not reading or showing PDFs. It runs on Node and in the browser, so it is not tied to one runtime.
  - GPT-6.2 Sol (4.5): Generating invoices, tickets, and reports is a recurring need across web and backend projects. PDFKit works in Node.js and browsers without a framework requirement, but its scope is document creation. The developer survey shows that Node.js is widely used, while the share of developers who need to generate PDFs remains unclear.
- **Helps a lot: 7.7** (likely 6.6 to 8.6)
  - Claude Opus 5.5 (7.0): The API is broad and mature: fonts, vector graphics, images, forms, encryption, tagged PDF and now tables with repeating headers. Layout is imperative, so complex documents take more code than with pdfmake or React-pdf. It cannot edit existing PDFs, and its types live outside the package. AI coding agents know the long-stable API well, but they may miss the recent 0.20 changes.
  - GPT-6.2 Sol (8.3): The streaming API handles precise drawing, embedded fonts, forms, and tagged documents, and 0.21.0 adds repeating table headers. A browser benchmark found the previous release fast at generating short documents, with a slower first import than jsPDF. The examples give developers and coding agents a clear starting point, while the separate typings miss newer exports such as registerStdFonts. The available benchmarks leave performance on long documents in 0.21.0 uncertain.
- **Holds up over time: 7.7** (likely 6.5 to 8.7)
  - Claude Opus 5.5 (7.5): Activity is steady: 167 commits and 7 releases in the last year, with v0.21.0 out the day before collection. pdfmake now depends on pdfkit directly, which ties another popular project to its upkeep. A small group of volunteer maintainers does the work, with no clear funding. The 0.20 release brought several breaking changes.
  - GPT-6.2 Sol (7.8): Seven releases and 167 commits in the past year show active maintenance, and the latest release addressed a reported production bundling failure. The 0.20 upgrade changed browser font setup and removed the virtual filesystem, so some upgrades require application changes. Recent GitHub releases come from one account, and long-term funding is unclear.
- **Used widely: 6.8** (likely 5.7 to 7.9)
  - Claude Opus 5.5 (7.0): Downloads were 68M in the last 4 weeks, against 4.9M a year before. That ratio of about 14 is well above the 4.1 median. Part of the growth comes from pdfmake now installing pdfkit directly. Still, its 23,418 dependent repositories are the most of any peer, which shows wide direct use.
  - GPT-6.2 Sol (6.5): Ecosyste.ms found PDFKit in 23,418 repositories and 540 packages, with the highest repository count among the supplied peers. Four-week downloads rose from 4.86 million to 68.04 million, about 14 times the prior year and above the 4.1 times catalog median. Build installs and downstream use by pdfmake and React-pdf renderer leave the growth in direct choices uncertain. The bundle captured no Hacker News stories or Bluesky posts for PDFKit.
- **Vouched for: 6.9** (likely 5.5 to 7.9)
  - Claude Opus 5.5 (6.0): pdfmake builds on PDFKit as its rendering engine, and independent guides list it as a standard choice for server-side PDF generation. We found no survey data, independent benchmarks, or Hacker News and Bluesky discussion. Our evidence of named companies running it in production is thin.
  - GPT-6.2 Sol (7.7): Two established generators rely on upstream PDFKit, and React-pdf reported matching output in its regression suite after switching from its fork. An outside Node.js comparison found PDFKit quick on a small invoice. These results cover specific workloads and earlier releases, and there is little survey evidence on PDFKit satisfaction.
- **Safe: 7.1** (likely 5.9 to 8.2)
  - Claude Opus 5.5 (7.5): It has no advisories on record, only 6 dependencies, and an MIT licence. In 0.18 it replaced unmaintained dependencies (crypto-js, jpeg-exif). The OpenSSF Scorecard is only 4.3: it has no security policy, no signed releases, unpinned dependencies and no branch protection.
  - GPT-6.2 Sol (6.6): PDFKit uses the permissive MIT license, has six direct dependencies, and has no PDFKit advisories in the supplied OSV data. Version 0.21.0 picked up security fixes from its font and PNG dependencies. The 4.3 OpenSSF Scorecard flags weak workflow token permissions, unpinned dependencies, and missing release signing, branch protection, and security policy. npm lists four collaborators, and publishing provenance remains unverified.

## Good

- It has a rich drawing API: vector graphics, embedded and subset fonts, images, links, outlines, AcroForms, encryption and attachments.
- It supports tagged PDF and PDF/UA accessibility, and built-in tables now repeat their header rows across pages.
- It is actively maintained, with 7 releases and 167 commits in the last year, and has no known security advisories.
- pdfmake is built on it, so it is a proven engine with the most dependent repositories in its category.

## Bad

- It only makes PDFs. To read, edit, merge or display existing PDFs you need pdf-lib or PDF.js.
- It ships no TypeScript types. You install @types/pdfkit, which can lag behind new APIs.
- Layout is manual and imperative. Complex documents take more code than pdfmake's declarative format or React-pdf's components.
- It is still 0.x after 15 years, and 0.20 brought breaking changes to browser font setup and exports.

## The numbers

- Downloads, 4 weeks: 68M
- In a year: ×14
- GitHub stars: 11k
- Commits, 12 months: 167
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/foliojs/pdfkit
- npm: https://www.npmjs.com/package/pdfkit

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
