Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie FOP question urgent plz?

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic