Generate invoice PDFs from JSON in one API call — no headless Chrome to babysit (opens in new tab)
Every billing feature eventually hits the same wall: "now turn this order into a PDF the customer can download." The usual options all have a tax: Headless Chrome / Puppeteer — you now run and patch a browser in production. Memory spikes, zombie processes, font issues in Docker. wkhtmltopdf — unmaintained, CSS from 2015. A LaTeX/HTML template engine — you own the templates, the rendering, and every edge case forever. For a feature that's supposed to be a side-quest, that's a lot of infrastruc...
Read the original article