Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to generate pdf file

 
yogesh m gaikwad
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir,
i have a jsp page.
and on same page when i am click on submit,
the same page pdf format will be generated for printing purpose...
i am waiting
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elaborate your problem and what needs to happen ?
 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 212
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many Open source packages that can be used for dynamic pdf generation in java viz. itext, fop, pdfbox.
 
Tim Moores
Bartender
Posts: 2893
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PDFBox is not particularly useful for creating arbitrary PDFs; iText is, but it would be a lot of effort to use its API to create PDFs mirroring arbitrary HTML pages. If you're creating CSS-styled XHTML, then the FlyingSaucer library might fit the bill.
 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 212
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PDFBox is not particularly useful for creating arbitrary PDFs


what do you mean by that?
 
Tim Moores
Bartender
Posts: 2893
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PDFBox's API makes it very hard to create PDF files that correspond to arbitrary HTML files, because it does not have high-level APIs for various HTML constructs, like tables. That would make it very hard to use for this.
 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 212
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh okay, I agree... There would be a coding effort involved to get it done using pdfBox
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic