Open Source HTML/CSS to PDF

I spent most of last night viddying Google Tech Talk videos on YouTube. They’ve got terrific stuff there. Too bad about the res.

One of the videos was about , a commercial product which takes HTML/CSS and converts it to a paginated PDF, suitable for printing in book format. (Yes, a dead tree type book.)

Awesome. Except for the price.

Too bad, too, because I could really use something like this. A couple of years ago I did a project for a company called CityFax, in which we had to produce, and email out documents in PDF format. We used a very serviceable PHP library to generate the PDF pages; but it was grueling work putting them together. Why learn a new language if you can do the same thing with the tools you already use every day? (i.e. HTML and CSS)

So I went in search of an open source version of this tool. And sho’nuff my brothers, it’s out there. XHTML2PDF, is an open source, dual license project which produces PDF’s for a living. It’s written in Python, but has command line versions for OS X, Linux and Windows.

Next time I need to generate a PDF, this is my go-to tool.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.