Hi i have to generate a PDF report from an xml file "data.xml" and using FOP. now all i know is that there has to be a formating object xml file to be used by FOP. My question is how to generate FO file from data.xml everytime user asks for a report. If its using XSL how would i run that XSL file to generate the that XML and make it an input for the FOP. Please guide me through the entire process on how to generate the required pdf from the xml file each time asked.. Thanks alot for any help Regards GUL
The simple answer is to use FO Processor like Apache FOP. Check the servlet example after downloading the package,It takes XML and XSL as input and produces FO on the fly(in memory) and output the PDF stream. http://xml.apache.org/fop/index.html => FOP Site.
Here's a more specific link to the FOP website: http://xml.apache.org/fop/servlets.html#xslt Note that it's you who needs to write "foo-xml2fo.xsl" referred to in that example. For that purpose, you need to learn the XSL-FO schema (this page could help you with that).