Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can anyone recommend an equally good opposite (HTML to PDF)?

wkhtmltopdf [0] is probably the most popular, but it's also ridiculously buggy.

0: https://code.google.com/p/wkhtmltopdf/



http://phantomjs.org/ is the best so far in my experience since it handles all the client side javascript properly.

The PDF's it outputs are full vector not just rasters, it the same engine used in Chrome to view PDF's and print web pages from my understanding.


We've tried everything, including PrinceXML, and PhantomJS has been the best for us so far.


Not open source, but you might want to check out PrinceXML. It is really good.


Flying Saucer worked great for me: http://code.google.com/p/flying-saucer/


I've had good results with htmldoc (http://www.msweet.org/projects.php?Z1).


Print the HTML document to a postscript printer, but have it print to file.

Then use ps2pdf from ghostscript.

You can automate this with a small amount of work.


In OS X, you can print to PDF from every application.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: