# pdfmake

> PDF document generation library for Node.js and browsers, written in pure JavaScript

Source: https://talira.ai/catalog/pdfmake-811sdqwj
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / generation](https://talira.ai/categories/documents/pdf/generation), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Platforms: web, linux, macos, windows
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Creator: bpampuch; maintained by liborm85 since 2016 (per LICENSE)

pdfmake builds PDFs from a declarative JavaScript object (a document definition) describing content, styles, tables, columns and page setup, and runs both in the browser and in Node.js. It handles line wrapping, tables with row and column spans and headers repeated across pages, dynamic headers and footers with page numbers, a table of contents, outlines, watermarks, QR codes, SVG, encryption and PDF/A. You describe the document as data instead of drawing at coordinates or rendering HTML.

## Links

- Website: https://pdfmake.github.io/docs/
- GitHub: https://github.com/bpampuch/pdfmake
- Docs: https://pdfmake.github.io/docs/

## Problems it solves

- describe a report as JSON and get a PDF with tables that flow across pages
- I keep calculating x/y coordinates by hand to draw tables in a PDF
- generate a PDF table whose header row repeats on every page
- export the data grid in our web app to a PDF entirely in the browser
- need footers with 'page 3 of 10' on a PDF built in JavaScript
- add a QR code and a watermark to a receipt PDF from Node
- build a table of contents and bookmarks for a long generated document in JS
- password-protect a PDF that our Node service generates
- make PDF/A output from JavaScript without a headless browser
- newspaper-style columns where text flows from one column into the next

## Features

- declarative JSON-like document definition
- tables with auto/fixed/star widths, row and column spans, repeated headers
- snaking columns
- dynamic headers and footers with page number and count
- table of contents and outlines
- images, SVG and QR codes
- watermarks and background layer
- font embedding
- encryption and permissions
- PDF/A
- file attachments
- open/print/download helpers in the browser

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.68 out of 1.
Signals: maintenance 1.00, adoption 0.82, momentum 0.58, community 0.82, backing 0.20, extensibility 0.00.

- last commit 9 days ago
- 68 commits in the last 90 days
- latest release 0.3.14 16 days ago
- 12.4k GitHub stars
- 113 contributors
- created by bpampuch; maintained by liborm85 since 2016 (per LICENSE)

## Alternatives

- [DocSpring](https://talira.ai/catalog/docspring-kjdwby1j.md): Fill PDF forms, generate PDFs and Word documents, and collect e-signatures with one API.
- [@react-pdf/renderer](https://talira.ai/catalog/react-pdf-renderer-e1aq29ey.md): PDFs, made with React
- [jsPDF](https://talira.ai/catalog/jspdf-1ag2wrna.md): Client-side JavaScript PDF generation for everyone.
- [PDFKit](https://talira.ai/catalog/pdfkit-2tzqj5bd.md): A JavaScript PDF generation library for Node and the browser.
- [pdf-lib](https://talira.ai/catalog/pdf-lib-80dtat8x.md): Create and modify PDF documents in any JavaScript environment.
- [PDFMonkey](https://talira.ai/catalog/pdfmonkey-g92tp6gk.md): PDF Generator API with a visual template builder
