• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newbie FOP question urgent plz?

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
reply
    Bookmark Topic Watch Topic
  • New Topic