aspose file tools*
The moose likes General Computing and the fly likes HTML to PDF possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "HTML to PDF possible?" Watch "HTML to PDF possible?" New topic
Author

HTML to PDF possible?

lalitha prasad
Greenhorn

Joined: Aug 28, 2004
Posts: 16
Hi,

I have one big Application Form .Client wants it to convert that big jsp page into PDF.He wants to print only with PDF documents.

Is there any API to convert HTML to PDF.

Thanks,
LALITH
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
iText is a free java-pdf library.
lalitha prasad
Greenhorn

Joined: Aug 28, 2004
Posts: 16
Hi,

Thank you for replying my question.In that site they mentioned like this.
"Can I convert a HTML file to a PDF document?
This is not really supported by iText."

If you know how to convert from HTML to PDf. please tell me.

Thanks,
LALITH
[ October 21, 2004: Message edited by: lalitha prasad ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Not really a JSP issue so I'm moving this along to General Computing.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Lybarger
Ranch Hand

Joined: Dec 19, 2003
Posts: 72
we use a custom style sheet to transform html to xsl-fo which is then rendered through fop to get a pdf for printing.
Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
Lalith,

I think you will be having in hand the content which you would be displaying in the HTML page. Hence, what can be done is that instead of forwarding to a html page, you can generate a PDF document using iText, put the data in that PDF and then forward to that PDF. By using JSP, we can set the content-type to text/pdf, which will pick the PDF you have generated and display it in the browser window.

By going through this approach, you can keep your client happy by displaying the content in a browser, as well having it in a PDF format.
[ October 22, 2004: Message edited by: Hemanth Pallavajula ]

Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML to PDF possible?