PDF & Document Generation
Generating PDFs, invoices, and printable documents from web apps.
Template / designer-driven
- ★ PDFme — open-source PDF generator with a visual template designer. Great for invoices, certificates, labels — anywhere a designer wants to lay something out and you fill in the data. The most-recommended OSS pick in 2026 for templated PDFs.
- Carbone — JSON-to-PDF using ODT / DOCX templates. Great if your "designer" is in Word / Google Docs.
React-based PDF
- ★ react-pdf (
@react-pdf/renderer) — React components → PDF. Best for fully custom, code-driven PDFs (statements, reports). - pdfme React wrappers — for embedding the PDFme designer in your app.
Low-level / programmatic
- pdf-lib — Pure JS, edit/sign/merge existing PDFs. Best when you have a template PDF and need to fill or modify it.
- PDFKit — Node-only, lower-level, mature.
- jsPDF — older, browser-friendly, large ecosystem of add-ons (autoTable, etc.).
HTML → PDF
- ★ Puppeteer / Playwright — render HTML to PDF in a headless browser. Highest fidelity to your existing HTML/CSS, and the easiest path if your design is already a web page.
- Browserless — hosted Puppeteer; free tier.
- WeasyPrint (Python), wkhtmltopdf — non-Node alternatives if you don't need a Chrome runtime.
Print-styling helpers
- Paged.js — polyfill for CSS Paged Media; great for book-quality PDF from HTML.
- react-to-print — print specific React components from the browser.
DOCX / spreadsheets
- docx (npm) — generate Word documents.
- exceljs — read/write XLSX.
- SheetJS — older XLSX library.
Pick this if…
- Templated PDFs (invoices, certificates): PDFme.
- Custom code-driven PDFs: react-pdf or PDFKit.
- You already have an HTML page that should print as PDF: Puppeteer.
- Word-template-based: Carbone.
- Modify existing PDFs (fill forms, sign): pdf-lib.