I’ve been building a property inspection platform with a friend of mine who’s an inspector. One of the requirements was deceptively simple: Generate PDF reports. That’s the deliverable inspectors send to insurance companies, banks, clients, etc. So the PDFs need to actually look good. Lots of photos, cover pages, tables of contents, structured sections, all that fun stuff. My friend uses Spectora right now and honestly their PDFs were pretty good. So I figured, alright, let me build something similar. I thought this would take maybe a day or two. I was wrong. The HTML-to-PDF rabbit hole I started where everyone starts: wkhtmltopdf headless Chrome random PDF libraries CSS print layouts "surely this StackOverflow answer will solve it" Every single path turned into pain. Stuff would randomly overflow pages. CSS that worked perfectly in the browser suddenly looked completely different in the PDF. Headers and footers were especially awful.…