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

I want to create PDF file from HTML file

 
Vinoth Thirunavukarasu
Ranch Hand
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create a pdf file using java API. If you have any solution please tell me.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most commonly used library is iText, which is very powerful. Although its web site has many extensive examples that are sufficient to learn how to create a wide range of PDFs, you will want to read "iText in Action" if you're serious about using it.

If the data that goes into the PDF is in XML, and you're comfortable about using XSL, then the Apache FOP library takes a different approach to creating PDFs.
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even you can use apache's poi also for PDF generation .
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Apache POI does not have any provisions for creating PDFs.
 
Pankaj Upadhyay
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ UD: Please do not post unrelated questions into existing posts. That's called "hijacking" and is frowned upon. Instead, start a new thread. ]
 
Pankaj Upadhyay
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deleting my post..don't want to offend anyone..

Thanks,
Pankaj
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pankaj Upadhyay wrote:I am totally fine with deleting my post but instead of that you could have created a new post. I dont have any back up of that post which I had written and again I need to write from scratch.

I sent the text of the post as PM to you prior to deleting it. Check the "My Private Messages" link at the top of the page.

And this was not hijacking, this was reusing some already running post so that there should not be lot of similar threads running concurrently.

It was hijacking, since the topic of your question was about using FOP specifically, which the original topic never got into.

you have just s*****d me

Please remember that the cardinal rule here on JavaRanch is Be Nice.

And now, if you want to discuss hijacking or post deletion any further, please start a new topic in the "Ranch Office" forum; that's the proper place to talk about site-related topics. I can copy the relevant parts of this discussion there if you like.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic