File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes .jsp file to .pdf file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark ".jsp file to .pdf file" Watch ".jsp file to .pdf file" New topic

.jsp file to .pdf file

Boon Subra
Ranch Hand

Joined: Jul 18, 2001
Posts: 69
hi All,
Please let me know how to convert a report.jsp file to report.pdf /somename.pdf the same file.
Its v.urgent.
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
look at
in FOP project
[ October 30, 2002: Message edited by: prabhat kumar ]
Boon Subra
Ranch Hand

Joined: Jul 18, 2001
Posts: 69
Hi Prabhat,
Thanks for the info.
I find that its based on XML.I am not aware of xml programming.
Is there any other method.
Jesse Beaumont
Ranch Hand

Joined: May 30, 2002
Posts: 43
Have a look at some of these. They are Java libraries for generating pdf files
I haven't used either of these, and I know that there are a bunch more as well. I used a package called pdflib but I can't seem to get at the website, so I don't know what happened to that. I used pdf lib to generate pdf files on the fly and display it in a browser.
Hope this helps.

---<br />Time flies like an arrow,<br />Fruit flies like a banana
Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
I have been using iText to create PDF files.
It works for me
G. P.

Joined: Nov 05, 2002
Posts: 2
I have used both iText and the FOP approaches.
IText is good if you want to read data from a database and directly format it into a PDF file. There is no XML involved here. It is good for generating small PDF's on the fly for display in a browser.
In the FOP way, you have to format the data you read into XML, then create an xsl stylesheet using formatting objects, the xml is then rendered into a PDF using the xsl stylesheet. If the document is large, the transfomation is rather slow and is better done offline. However this way gives you more flexibility on the PDF. Easy to modify PDFs quickly... It will take a little longer to setup and learn if you have not worked with XML/XSL before.
I agree. Here's the link:
subject: .jsp file to .pdf file
It's not a secret anymore!