The Toolkit for Online Communities
17713 Community Members, 0 members online, 1994 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : More control of output : One Message

Forum OpenACS Q&A: Response to More control of output

Posted by Tilmann Singer on
Here are some options for creating pdf's:

fop from xml.apache.org. Converts xml to pdf using a xsl-fo stylesheet. Not suited for on-the-fly creation IMO because it's too slow. Also writing the stylesheets can be cumbersome, in particular because there is a lot of the spec that fop does not yet implement - finding those by experimentation is a tiring process.

If you want a lot of control then take a look at the reportlab toolkit. It's sort of a graphic library that outputs to pdf instead of the screen, open sourced and in python. Very useful I think - I am using it to generate business letters on the fly from my website. Drawback is that you have to do quite a bit of programming to customize the look of your output.

For a quick-and-not-so-dirty solution there is also htmldoc. It converts html files to pdf, with the bonus that you can insert special <!-- comments --> in the html that contain formatting instructions like page breaks etc.

Posted by Dev eloper on
If you do not want to have to program your application to handle conversion from html to pdf, then you can look at a web service offered by Gilgamesh Solutions at http://gilgamesh-solutions.com/webservices.cfm. Using this service you will be able to send a URL to an html page you build on the fly on your server, and the service will actually crawl over your URL and convert your page to pdf!

You can control many options including footers, headers, page breaks, page orientation (landscape vs. portrait), include high quality images (png, jpg, gif). The beauty about this service is that you are able to control the format of your generated pdf using html tags!

If you have a coldfusion server, then you can actually buy the product for around $60 I believe. But you might want to go with the service option if you do not want to deal with installation, setting up your application, worrying about changing your application when you upgrade, if you use different languages and you want an application that is platform and web server independent.

Give it a try, I believe that they have test environments on their web site where you can try their products live for free.