开发者

Get HTML content by HttpServletResponse / HttpServletRequest

Is there any way to obtain a HTML content by开发者_运维知识库 HttpServletResponse or HttpServletRequest?

I need to print a PDF based on HTML object.


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/


You can create a PDF from the HTTP request data and whatever other information you need from the server side by merging it into a Velocity template containing the FO defining your PDF.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜