A fixed base PDF plus variable fields, all in JSON
pdfme is a TypeScript library that pours data into a PDF layout, in Node.js or in the browser. A template pairs basePdf, the fixed background (an existing PDF, or a blank page given as width, height and padding), with schemas, the variable fields and their type, position and size. generate takes the template plus an array of inputs, one per page, so several inputs make a multi-page PDF.
Drop-in designer, splitting tables and twelve barcode formats
- Three UI classes:
Designerto lay fields out with the mouse,Formto collect values,Viewerfor a read-only preview. Each one mounts into a DOM element.@pdfme/uibundles React, so the host app doesn't have to install it, and the interface ships in thirteen languages, French among them. - Field types: text with inline Markdown and font size fitted to the box, tables and lists that break onto the next page, JPEG, PNG or PDF images, SVG, shapes, dates, dropdowns, checkboxes, and twelve barcode symbologies including QR, EAN-13, PDF417 and GS1 DataMatrix. Missing types can be written as plugins.
- Curly-brace expressions: a text field can pull in another field's value (
{field1}) or print a calculation ({1+1}). - Fillable output:
generateFormturns editable text fields, checkboxes and radio groups into AcroForm fields the recipient fills in their PDF reader. - JSX and a CLI:
@pdfme/jsxwrites templates as JSX components, and thepdfmeCLI validates a template and checks fonts,basePdfand the output path ahead of a CI run. - Page tools:
@pdfme/manipulatormerges, splits, rotates, inserts and removes pages;@pdfme/converterrenders PDF pages to PNG and packs images into a PDF.
Reflow needs a blank page, v6 needs Node 20 and ESM
Automatic page breaks only work on a blank base. Growing text (overflow: "expand") and tables that spill onto the next page need basePdf to be a size object, and so do headers and footers repeated on every page (staticSchema). Over an existing PDF the pages stay fixed, and the Designer switches text growth off.
Version 6, out since April 3, 2026, requires Node 20 and ESM imports. Packages are ESM only, browser builds target es2020, and the default plugin registry holds nothing but text: images, tables, signatures, barcodes and checkboxes have to be imported from @pdfme/schemas and passed through plugins. The Getting Started page still says Node 16; the v6 migration guide and the CLI both ask for Node 20.
Signature fields store a picture. The stroke drawn in the form is exported as a PNG and placed like any other image, and nothing in the repository does certificate-based signing. Sealing the output takes a second tool, such as @signpdf with a P12 certificate.
The getting-started guide is aimed at apps that embed a PDF editor or turn out PDFs in volume without a performance hit. The website says most generations finish in tens to hundreds of milliseconds.
The code is MIT, custom features cost money. The README offers to scope and build a requested feature for a fee, and says the result always ships as open source.
6.2.8 came out on October 21, 2026, the thirtieth tag on the 6.x line in six and a half months. The CLI, the JSX layer and Markdown-to-PDF conversion are labeled beta, and the converter docs still call that package a work in progress.
