Guides
Practical guides for generating PDFs from HTML, testing layout, automating reports and invoices, and fixing the page breaks that break document automation.
Start here
- HTML to PDF in Node.js — install the SDK, render templates, handle fonts and images, and ship a production-ready PDF pipeline.
- Automated PDF layout testing — catch split tables, orphaned charts, wrong TOC numbers, and misplaced signatures before delivery.
Use cases
- White-label client reports for agencies — one template, multi-client branding, report TOC, and chart/commentary checks.
- Invoice PDF generation from HTML — line items, totals, multi-page breaks, signatures, and currency formatting.
- Async PDF generation with webhooks — queue long jobs, verify signatures, and handle retries and the DLQ.
Layout fixes
- Add a table of contents with real page numbers — measure headings after layout, patch the TOC, and keep pagination stable.
- Prevent page breaks inside tables and charts — combine print CSS with a spatial test case that catches the splits CSS cannot.
- Extract element coordinates for e-signatures — page numbers, bounding boxes, and raster mapping in PDF points.
Choose an API
- Choose a PDF generator API for Node.js — what to check for coordinates, TOC, forms, retries, and storage.
Examples
- Q3 report — auto TOC, chart/commentary healing, and signature coordinates.
- Travel itinerary — five checks, two patches, and a day index/page total measured after the layout settles.
- Invoice self-healing — overflow, Tier 1 patches, and Tier 2 webhook fallback.
Need the full API reference?
Start with the generation options, then add layout checks and webhooks.