Generate PDF invoices or reports in a Node.js backend by writing JavaScript that describes the document layout.
Create a browser-based PDF export feature where users download a styled document without any server-side processing.
Build a PDF with custom fonts, embedded images, and clickable links for a digital product catalog.
Add fillable form fields to a PDF document for e-signatures or data collection workflows.
| foliojs/pdfkit | stevenjoezhang/live2d-widget | browserstate/history.js | |
|---|---|---|---|
| Stars | 10,655 | 10,655 | 10,665 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
PDFKit is a JavaScript library for generating PDF files from code, usable in both Node.js server environments and directly in a web browser. Instead of filling out a PDF template by hand, you write JavaScript that describes the document: add a page, set a font, write some text, draw a shape, embed an image, and then export the result as a PDF file. The API is designed to be chained, meaning you can write a sequence of calls one after another without storing intermediate results. The library handles the technical details of the PDF format for you, including font embedding, page layout, and binary encoding. In terms of features, PDFKit can render text with automatic line wrapping and alignment, embed custom fonts in TrueType and OpenType formats, include JPEG and PNG images, draw vector shapes and paths using an interface similar to the HTML canvas element, and add annotations such as links, highlights, and underlines. It also supports fillable form fields (AcroForms), document outlines for navigation, PDF encryption, and access control settings such as restricting printing or copying. For browser use, PDFKit works with build tools like Browserify or webpack, or you can load a prebuilt standalone file without any build step. Output in the browser is streamed to a Blob object, which can be displayed in an iframe or uploaded to a server. Installation for Node.js projects is through npm or yarn with a single command. The documentation and a programming guide are available on the project website, and the guide itself is distributed as a PDF generated by PDFKit, which serves as a live example of the library's output. The library is released under the MIT license.
PDFKit is a JavaScript library for creating PDF files programmatically in Node.js or the browser, supporting text, images, vector shapes, custom fonts, fillable forms, and encryption.
Mainly JavaScript. The stack also includes JavaScript, Node.js, Browserify.
Use freely for any purpose including commercial products, as long as you include the MIT license notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.