HTML to PDF (using Google Chrome API)?

I have some documents in HTML, and I need them to be printed / generated on the server (there is no user interface automated, based on Linux).

I am very pleased with the Google Chrome "html to pdf" from the documents, but I wonder if it is possible to somehow use this "component" of the "html to pdf" print engine from the Google Chrome Browser?

+5
source share
2 answers

I actually found a solution: First whtmltopdf http://code.google.com/p/wkhtmltopdf/

And in the end, I realized that mpdf (php lib) can help me too :)

+5
source

If you need an HTTP API service to convert HTML to PDF from a URL, you can check out this answer I wrote and explains how to do this.

Example:

https://dhtml2pdf.herokuapp.com/api.php?url=https://www.github.com&result_type=show 

shows in a browser the PDF generated at https://www.github.com .

Check out the project on Github .

Hope this helps.

0
source

Source: https://habr.com/ru/post/1435651/


All Articles