• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Generate PDF

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi..
I have this jsp page which i want to send as an attachment in PDF format .. is that possible....

What i want to do is that when i click on a button i want the jsp page that is displayed to be converted into pdf and then send it as an attachment through email or save that attachment on the hard disk.

Is this possible???... please can some one help me out on this one.. and please do give some code also...

Any help would be appreciated quite a lot

Thank you
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can have your output page in well formed xHTML (rather than straight HTML) then using something like cocoon with FOP is probably one of your best bets (especially if you're already using Tomcat?).

Check out the links below:
http://cocoon.apache.org/2.1/howto/howto-html-pdf-publishing.html
http://xml.apache.org/fop/
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We use iText to generate simple pdf files of the different lists of our web applications.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use apache FOP it's nice & cool

As mentioned in the previous post if u have xml or well formated html then that is so easy

XML--> XSL-FO--->PDF

once you have XSL-FO try to use it as a template in the jsp
meaning instead of html.
try change the content type to application/pdf and pass this XSL-FO jsp stream to FOP API's and u will get a PDF.

pls let us know how did it go
 
This tiny ad is wafer thin:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic