File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Converting Html to pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Converting Html to pdf" Watch "Converting Html to pdf" New topic

Converting Html to pdf

Suchitra Bhat
Ranch Hand

Joined: Dec 30, 2005
Posts: 62
Hi All,

I need to convert and save the Html that is generated on the fly to pdf. Requirement is ,when user ckicks on the link ,next page has to be displayed on the user browser and a pdf copy of next page has to be saved on his/her machine.

Any pointers will be greatly appreciated.

Thanks and regards,
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
I am not aware of free tools which can convert to HTML to PDF however couple of commerical softwares are available like BigFace, CORDA and PD4ML. Much better way will be to use Apache FOP. All you need to do is
- Convert HTML to XHTML
- Apply XSLT to create FO
- Use Apache FOP to convert the FO to PDF

You can search at and under (XSL and XSLT)
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
This site has a tutorial that includes converting XHTML to pdf
Anju sethi
Ranch Hand

Joined: Dec 26, 2005
Posts: 91

This above doc will guide you thru the process of converting html to pdf.

thanks,<br />Anju Sethi
I agree. Here's the link:
subject: Converting Html to pdf
It's not a secret anymore!