How to export an entire DIV (with images, table and charts) to PDF?

Asked

Viewed 378 times

0

I have a DIV with several elements ( images, table, graphics) and need to export this whole DIV to PDF, I tried using jsPDF plugin but did not render CSS!!

  • 1

    It would be interesting to post your code so we can help you better.

  • in that question each answer indicates a different tool, worth giving a check

  • so my code is a dynamically generated table, it gets huge with more than 3000 lines, now I need a code that exports this div to PDF, I found something similar, but does not render CSS.

  • I use a php lib for this work, it’s the only way! I’ve used mPDF

  • in this case I’m working with java in the backend, I already found a lib called itext but it doesn’t render CSS :/

  • if it doesn’t render then it does a function that before it generates the pdf it takes the contents of the css file and plays in a <style> and poe tag in the page header

  • look here: http://stackoverflow.com/questions/12043035/html-to-pdf-using-itext-external-css

  • so man from what I saw there he was also with this problem, no other solution served, I think it is impossible to do this in the backend because of the Graphics, the most correct would be to do with javascript in the front end

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.