PDFKit
JavaScript library that generates multi-page PDF documents for Node and the browser.
PDFKit is a JavaScript library that generates PDF documents for Node and the browser. A document is built with chained calls: text, images, vector paths, tables and annotations are added to a document object, and its output is piped to a file or an HTTP response. In the browser the output is collected as a Blob instead. The package is installed with npm, and a prebuilt standalone file is distributed with the releases. The programming guide covers the API with examples.
Worth knowing
A bundle that inlines PDFKit must keep its standard-font metrics and sRGB profile beside it, or register the standard fonts in code, because the Node build loads them from files next to the built file. The browser build has no file system access, so fonts and images are passed to it as data.
Identity
Rendering and deploy
- Install with
- npm, download3
Releases
Adoption
Sources
- 2026-11-16: links, Categories, Runtime
pdfkit.org/ - 2026-11-16: links, Written in, License, GitHub stars
api.github.com/repos/foliojs/pdfkit - 2026-11-16: links, Install with
github.com/foliojs/pdfkit/blob/master/README.md - 2026-11-16: Maintainer
github.com/foliojs/pdfkit/blob/master/LICENSE - 2026-11-16: First release
registry.npmjs.org/pdfkit - 2026-11-16: Current major version, Last release
api.github.com/repos/foliojs/pdfkit/releases/latest - 2026-11-16: Contributors
api.github.com/repos/foliojs/pdfkit/contributors - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/pdfkit - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/pdfkit