pdfmake is a JavaScript library for generating PDF documents entirely in JavaScript — both in the browser and in Node.js. You describe your document as a plain JavaScript object and pdfmake renders it into a pixel-perfect PDF, handling text flow, tables, images, fonts, and more.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bpampuch/pdfmake/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Create your first PDF in minutes with a working code example
Installation
Install pdfmake via npm or use the browser bundle
Document Definition
Learn the document definition object that drives everything
API Reference
Explore the full pdfmake instance and output document APIs
What you can build
pdfmake handles a wide range of document generation scenarios:Rich Text
Fonts, colors, bold, italics, superscript, and inline styles
Tables
Complex tables with col/row spans, custom borders, and fill colors
Images & SVG
Embed JPEG, PNG, data URLs, and SVG graphics
Multi-column Layouts
Side-by-side columns and newspaper-style snaking layouts
Headers & Footers
Dynamic per-page headers, footers, backgrounds, and watermarks
Table of Contents
Auto-generated TOC with page number references
Custom Fonts
Embed custom TrueType fonts via the virtual file system
PDF Security
Password protection and permission restrictions
PDF/A Compliance
Generate archival-compliant PDF/A-1, PDF/A-2, and PDF/A-3 documents