File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes pdf reports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "pdf reports" Watch "pdf reports" New topic
Author

pdf reports

manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
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...


MT
Balan Raj
Ranch Hand

Joined: Aug 26, 2003
Posts: 74
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30309
    
150

iText also does this.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61007
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
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.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30309
    
150

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

Joined: Aug 26, 2003
Posts: 74
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

Joined: Sep 08, 2003
Posts: 3
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: pdf reports