• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pdf reports

 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • 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...
 
Balan Raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • 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/
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 ?
 
Rodolfo Baeza
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic