pdfme

pdfme

WHAT IS IT?

pdfme is a TypeScript library that generates PDFs from JSON-based templates. You design a layout once (by hand or in the bundled WYSIWYG designer), feed it your data, and the library outputs the PDF. It works both in the browser and in Node.js, so you avoid standing up a separate rendering service or wrestling with HTML-to-PDF hacks.

WHY IS IT INTERESTING?

  • JSON templates: the layout is plain data, so it's versionable in Git, diffable and easy to manipulate programmatically.
  • WYSIWYG designer: a React component to drag-and-drop fields into place instead of coding the layout by hand.
  • Browser and Node.js: the same engine runs on both sides, handy for generating on the front end or the back end.
  • Modular packages: @pdfme/generator, @pdfme/ui, @pdfme/common and a CLI to validate and diagnose templates.
  • Extensible schemas: text, images, tables, barcodes, signatures, plus custom field types through plugins.

USE CASES

  • Generate invoices, receipts or certificates from structured data.
  • Produce documents in bulk from a database or spreadsheet.
  • Let a non-technical user edit a template through the designer.
  • Fill dynamic PDF forms straight in the browser.