HTML to PDF (Using Google chrome API)?
Asked Answered
G

2

7

I have some documents in HTML and i need it to be printed/generated on server (no UI, automated, linux based).

I'm very satisfied with Google Chrome "html to pdf" of the documents but i'm wondering is it possible to use that "component" of "html to pdf" printing engine from Google Chrome Browser somehow for this purpose?

Gogetter answered 22/9, 2012 at 10:31 Comment(1)
G
5

Actually i found the solution: First one wkhtmltopdf http://code.google.com/p/wkhtmltopdf/

And at the end i realized that mpdf (php lib) can help me too :)

Gogetter answered 29/10, 2012 at 11:57 Comment(2)
Excellent, That is work for me to export the webpage to pdf or even jpg file.Smocking
WkHtmlToPdf doesn't use the same engine as Chrome, so output is probably not exactly the same as Chrome's Print to PDFSulphuric
B
0

If you needed an HTTP API service to convert HTML to PDF from an URL you may want to check this answer that I wrote that explains how to do it.

Example:

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

shows in the browser the PDF generated of the site https://www.github.com.

See the project in Github.

Hope it helps.

Boatel answered 4/2, 2018 at 13:56 Comment(1)
This was an awesome project but it has stopped working. Is there another project out there that does the same thing ?Solanum

© 2022 - 2024 — McMap. All rights reserved.