Export div content to PDF

I know that there are several questions on this, but I just can’t find what I’m looking for, so I hope someone answers me. So, I am trying to do the following:

Imagine you have a 400 x 400 pixel div. The user loads the image and enters the text through the input [type = "text"], and all this is displayed inside this div. I want to export all the contents of this div to PDF, possibly using JavaScript (jQuery) with PHP. What would be the best way to do this?

If anyone could show a small example (code), I would appreciate it!

+3
source share
3 answers

, PHP-Printer-api (http://www.php.net/manual/en/book.printer.php) , , PDF-Creator (http://sourceforge.net/projects/pdfcreator/). , PDF-Creator .

...

0

You can create a PDF file from the HTML page with the WeasyPrint package . It is very easy to use and has the highest speed than javascript.

0
source

All Articles