Welcome to my life. Let's tap dance from one implementation to another as we wait for an eighteen year W3C draft to get implemented.
FlyingSaucer, prawn, itext, fpdf, PDFkit, pdftk, aaalllll the way to today: Paged.js, Weazy, and vivliostyle
Yeah yeah yeah, I know. Prince is great. That's fine. My customers don't want to pay that kind of cash to make PDFs and I agree with them. Especially a feature that should have made it into browser core almost two decades ago.
I long ago imagined a steamy scenario involving Adobe executives and W3C steering groups, but that back room orgy has grown to improbable durations by the current date.
Weasyprint is an excellent tool for converting HTML to PDF. It has supported CSS Paged Media Module for a while; this has been very useful for making printable PDFs from web pages.
Weasyprint seems to be one of the few HTML->PDF engines out there that doesn't depend on a browser engine. It's impressive just how much works (HTML, CSS, SVG, etc), given that this is a relatively simple project compared to a full-featured browser. Performance isn't bad, considering it is implemented in Python.
How well does it install on systems that don't run python web apps? (I.e. I have whatever python the distro comes with)
Currently reliant on wkhtmltopdf for a few client projects, and while it works it has some.. Oddities that if I can, I'd like to get rid of having to remember.
Unfortunately wkhtmltopdf seems to be sunsetted... it's GitHub repo was archived in January and there don't seem to be any plans to move development elsewhere. When its version of WebKit becomes too old to be useful, that'll sort of be it :(
It's a paid product built and maintained by Håkon Wium Lie, the original developer of the CSS language (and the former CTO of the Opera browser company).
I 100% think they should prioritize this. They've added a bunch of cool stuff to CSS, but half of it is useless unless they actually implement a standard document type of interface so that HTML can be used to create paged media.
That was 18 years ago. That comment is old enough to vote.