Is there any way to obtain a HTML content by HttpServletResponse or HttpServletRequest?
I need to print a PDF based on HTML object.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this scenerio i would use a filter.
You can access content which wanted to be output and redirect the output stream to your PDF generator which can convert HTML to PDF.
More about Filters :
http://www.oracle.com/technetwork/java/filters-137243.html
common way is to create PDFs from model objects.
Then use iText.
http://itextpdf.com/