# foliojs/pdfkit

A JavaScript PDF generation library for Node and the browser

Repository: https://github.com/foliojs/pdfkit
Canonical: https://ross.abutalabs.com/products/pdfkit
Homepage: http://pdfkit.org/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-08-26T15:54:14+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 5532, "days_push": 7, "days_rel": 10, "gap_med": 59.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10698, forks 1221 (observed 2026-08-28T04:10:43.812046+00:00)

## What it is
PDFKit is a JavaScript library for programmatically generating PDF documents in Node.js and the browser. It offers a chainable, canvas-like API for text, vector graphics, images, fonts, annotations, forms, encryption, and accessibility features.

## Use cases
- generate pdf invoices from node.js
- create multi-page printable reports in javascript
- embed custom fonts in a pdf
- draw vector graphics and charts into a pdf
- generate pdfs in the browser for download
- add links, bookmarks, and annotations to pdfs
- create fillable pdf forms (acroforms)
- produce accessible tagged pdf/ua documents

## When to choose
- you need to generate PDFs programmatically in Node or the browser with fine-grained control
- you want a canvas-like API for vector drawing plus text layout, font embedding, and images
- you need PDF features like encryption, AcroForms, outlines, or Tagged PDF accessibility

## When to avoid
- you just need to convert existing HTML pages to PDF (use a headless browser or HTML-to-PDF tool instead)
- you need to parse, edit, or extract content from existing PDFs rather than create new ones
- you want high-level automatic document layout out of the box - table and layout APIs are still limited

## Facets
- artifact type: library
- maturity: active
- function: pdf, graphics, templating, image-processing
- domain: pdf, web-development, developer-tools, files
- platform: browser, cross-platform
- tags: pdf-generation, document-generation, vector-graphics, font-embedding, node-streams, printable-documents, nodejs, javascript

## Member repositories
- foliojs/pdfkit (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:43.812046+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:17:58.005612+00:00, confidence not recorded.
  - readme: https://github.com/foliojs/pdfkit (fetched 2026-08-28T04:10:43.812046+00:00, sha 1809b63ecb22)
  - homepage: http://pdfkit.org/ (fetched 2026-08-29T08:17:37.166882+00:00, sha 00cf847ee96f)
  - site_page: http://pdfkit.org/docs/getting_started.html (fetched 2026-08-29T08:17:37.171599+00:00, sha 009586b01eba)
  - site_page: http://pdfkit.org/docs/paper_sizes.html (fetched 2026-08-29T08:17:37.173568+00:00, sha 5a6698397ac9)
  - site_page: http://pdfkit.org/docs/vector.html (fetched 2026-08-29T08:17:37.175268+00:00, sha a1a811a637da)
  - site_page: http://pdfkit.org/docs/text.html (fetched 2026-08-29T08:17:37.177140+00:00, sha e15b4d07b79d)
  - site_page: http://pdfkit.org/docs/images.html (fetched 2026-08-29T08:17:37.179002+00:00, sha 91108c8072fd)
  - site_page: http://pdfkit.org/docs/outline.html (fetched 2026-08-29T08:17:37.180605+00:00, sha 214eed50d102)
  - site_page: http://pdfkit.org/docs/annotations.html (fetched 2026-08-29T08:17:37.182112+00:00, sha 54834e772fc9)
  - registry_npm: https://registry.npmjs.org/pdfkit (fetched 2026-08-29T08:17:37.183666+00:00, sha fcdcae62c912)
- Data as of 2026-08-30T08:39:29.467469+00:00.
