This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes I want to create PDF file from HTML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "I want to create PDF file from HTML file" Watch "I want to create PDF file from HTML file" New topic
Author

I want to create PDF file from HTML file

Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

Hi,
I want to create a pdf file using java API. If you have any solution please tell me.


Java Best Practices
Linux Best Practices
Amortization Calculator

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42022
    
  64
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.


Ping & DNS - my free Android networking tools app
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

even you can use apache's poi also for PDF generation .


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42022
    
  64


Apache POI does not have any provisions for creating PDFs.
Pankaj Upadhyay
Greenhorn

Joined: Nov 06, 2008
Posts: 21
[ 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 (SCJP 1.6 == 86%)
Pankaj Upadhyay
Greenhorn

Joined: Nov 06, 2008
Posts: 21
Deleting my post..don't want to offend anyone..

Thanks,
Pankaj
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42022
    
  64
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.
 
GeeCON Prague 2014
 
subject: I want to create PDF file from HTML file