| Author |
How to create the PDF in java from the String(containing HTML tags basically HTML string ) in java
|
Chetan Dorle
Ranch Hand
Joined: Aug 06, 2009
Posts: 128
|
|
I have the HTML of some page in the String format
for example :-
String sPDFContent="<table><tr><td>Chetan</td></tr><tr><td>test</td></tr></table>";
This String i want to convert in the PDF format .
This all i m doing because i want to send the PDF file which will generated dynamically, as an attachment in the e-mail.
If someone having more easy and better answer,suggest.
Thanks to everyone in advance.
|
 |
Tim McGuire
Ranch Hand
Joined: Apr 30, 2003
Posts: 819
|
|
Read this page for a synopsis of all the libraries to choose from:
http://java-source.net/open-source/pdf-libraries
|
 |
Sri Harsha Yenuganti
Greenhorn
Joined: Mar 02, 2010
Posts: 18
|
|
Use iTextPdf libraries !
http://itextpdf.com/
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
+1 on iText for simple HTML documents. For more advanced documents I've used Yahp with some success. It's not perfect but better than a lot of commercial products I've tried.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Chetan Dorle
Ranch Hand
Joined: Aug 06, 2009
Posts: 128
|
|
Hey Guys thanks a lot for your suggestion .
Finally i got solution after all...
I used PD4ML,PD4PageMark classes and pd4ml.render(urlstring, fos); method of PD4ML class .
Have a great day .....
Njoy....
|
 |
 |
|
|
subject: How to create the PDF in java from the String(containing HTML tags basically HTML string ) in java
|
|
|