Thursday, September 3, 2009

Programming foa and fop to generate pdf files from xml and xslt

In real world, there is a great deal of demand of pdf files. Programmers often need to generate pdf file from data fed in different formats. One popular format is xml. There exists lots of ways to generate pdf files in different programming languages. And interestingly most of them are platform and program independent. Sweet!

I am currently programming xslt. There has been an interesting task. We have xml file as input and fop batch file which can be run to accept some xml, xslt and pdf files to generate pdf out of the xml and xslt file. With this scenario, all we have to do is write the xslt that styles and maps to the original xml file, which can be then rendered as pdf files.

We are writing xslt using foa. The fop can take this xslt as input. The foa even provides IDE to write xslt. And this free yet significant tool is very programmer-friendly in the sense it provides environment to integrate style and xml at once into the xslt from one place.

This is my first time with fop and foa. They do make great marriage. But there doesn't seem to be updates in foa since long time. The latest foa we get is too old to match the latest version of fop. How would this foa keep with the latest, new, improved fop?

Anyway, I hope to come up with more issues in using xsl. Keep up warming your programming. Happy programming!

Popular Posts

Recent Articles