• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

pdf reports

 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need your help on creatring PDF reports in my project. I have a JSP, which has sevaral links such as " Customers visited today" and Customers visited in the month" etc. Upon clicking the links, the JSp should fetch the data from the database and put them in printable PDF document, so that the user can view the report as well as print the report.
Basically , the report need to be genearated in PDF format.
Could u please help me with different ways to achieve this...
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out Apache's FOP.. You can define XSL templates and pass XML input to get out PDF's.
http://xml.apache.org/fop/
 
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iText also does this.
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, lal lal!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
Thanks!
bear
JSP Bartender
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a package called JClass (and many others) out there that can handle this rather nicely but it costs a bit. If that is a problem use xalan to transform a DOM and xsl into a PDF file.
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for yoru replies. We have been asked to verify , which one of Itext adn FOP are simple and easy to implement. basically, our reports are simple replorts.. As per my understanding , FOP is a bit heavy-weight generally used for complex reports.. whereas Itext is is for simple reports..
But, I request yu to give me suggestions on which one to choose to generate the PDf reports..
t
 
Jeanne Boyarsky
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

As per my understanding , FOP is a bit heavy-weight generally used for complex reports.. whereas Itext is is for simple reports..


I agree with that statement. iText provides many examples (and a tutorial) so it is easy to cut and paste code to get the features you want.
 
Balan Raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not familiar with iText so I can't comment on it.
Since I've used FOP, I can say its pretty easy to use, though you need to have some 3 jars.
FOP does comes with its own set of examples which can be used out of the box or with modification as it suits you and there is a Yahoo group called XSL-FO which can help
http://groups.yahoo.com/group/XSL-FO/
Am I hard selling FOP ?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also try http://jasperreports.sourceforge.net/ or http://www.object-refinery.com/jfreereport/ both allows you to generate PDF reports from any swing or web application, and both are open source.
 
reply
    Bookmark Topic Watch Topic
  • New Topic