div to PDF ? Java EE, jQuery, PGSQL
I try to catch a div text (an history log from postgresql) for generate in PDF.
Anyone has an idea to implement that?
Does i must generate it开发者_开发知识库 in a java servlet or can i do this in jquery?
thanks in advance!
You're putting the cart before the horse here. Generating a PDF is something you do server side. Your div is client side, but you probably generated it on the server.
Keep the result of your log on the server somewhere (view scope preferably, but it depends on your server technology) and when the user requests a pdf version, use itext to generate a PDF out of it.
I you really only have your log on client side, you will need to submit it back to the server. I wouldn't suggest it though.
精彩评论