How to convert to PDF from my JSP/HTML file?.
I want to convert a particular part of my webpage to a PDF file. Is it possible?
How to convert to PDF from my JSP/HTML file?.
I want to convert a particular part of my webpage to a PDF file. Is it possible?
Yes. Take a good look at booth Apache FOP and iText. No matter what you use, you'll probably have to do a little fiddling.
I used HTMLDoc a couple of years ago and had pretty good luck with it.
try wkhtmltopdf. It is a command line utility that can be provided an html file or web address and a save location for the pdf. Very easy to use and utilizes the same rendering engine as safari. Works MUCH better than many of the other parsers that I have used (that don't always support CSS and other advanced layout features.
flying saucer library is the best one to use. It works on top of itext and makes the task of conversion very easy.
Take a look at html2ps (Perl) or html2ps (PHP). However, none of the two is implemented in Java.
You might also want to read this article.