Converting HTML to PDF
When I’m looking at a web page with Safari, all I have to do is hit Command-P and save as PDF, and I have a nice PDF of the page.
Is there a way to do this automated and server-side on a standard linux system? I need to have a web app generate these PDFs dynamically on the fly. And they need to look good, with different designs, etc., so it’s more than just getting text to show on a page.
I’ve come across HTMLDOC, and it does the job in theory, but only for crummy HTML—supports most of HTML 3.2, some of HTML 4.0, and no CSS. Not great, if I also want to produce reasonable HTML output.
Are there any other options out there that you’re aware of? Is there code in Webkit for this, and would it be possible to get some of that to run on a Debian box? Hm, doesn’t sound likely.
Leave a comment