Blueprint and Prince XML

I’m not sure if this ever happens to you, but I have now volunteered twice to turn very manual processes at my Church into almost fully automatic Web applications. The first was a scheduling application of many different activities and their respective leaders and helpers to make sure there were no conflicts. The most recent was the church directory. Both applications were written in Python using the Django framework. Django quickly gets me to the point of having an elegant administration site to manipulate my models, so most of my time has been spent either on the scheduling algorithm or the actual presentation of the results.

Django has a lot to offer when it comes to organization of your templates, but (at least not that I’m aware of) it does leave you in the middle of nowhere with a blank HTML canvas for you to show your results. At the time, Blueprint had just been released and since I knew that TABLEs were evil, I decided to give this CSS framework a try. If you do, I definitely recommend to use this guide. In a few minutes, I had a decent looking layout for my results, but unfortunately, the print function was far from working. What does everyone using Blueprint do for printing? I tried Firefox 3 and Safari and neither come close to rendering my page. My first solution was to use online services but once paged media entered into the situation, the online service became less effective. Enter Prince XML. A friend of mine recommended to try it out since his company had just purchased a commercial license. He’s a newbie when it comes to HTML/CSS but from what I heard from him, Prince just works. Fortunately, Prince has a free download option for most platforms and only puts a logo on your PDF but not when printed. I had to fiddle a little bit with my template, but not much longer I had a pretty decent PDF of our directory. It sure saved me from using LaTeX.

I’d love it if you can recommend an open source library that I could use in Ubuntu for printing HTML/CSS with paged media as good as Prince XML.


About this entry