4 ms·
A basic command line alternative using Headless Chrome[1]: chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/ [1] https://develope
by krn 8y ago
A basic command line alternative using Headless Chrome[1]:
chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/
[1] https://developers.google.com/web/updates/2017/04/headless-chrome#create_a_pdf_dom https://developers.google.com/web/updates/2017/04/headless-c...
- rav 8y agoSimilar functionality is packaged in wkhtmltopdf, which essentially runs Webkit headless to print to PDF. https://wkhtmltopdf.org/ https://wkhtmltopdf.org/
- cjimti 8y agotxPDF is a simple containerized web services wrapper around wkhtmltopdf, intended to be used as a Microservice component in a larger system.
- ashkulz 8y agowkhtmltopdf maintainer here. That's really cool! Did you manage to find a workaround for https://github.com/wkhtmltopdf/packaging/issues/2 https://github.com/wkhtmltopdf/packaging/issues/2? If so, would appreciate a PR :-)
- cjimti 8y agoThanks, I'll check out that issue and see if there is anything I can contribute. wkhtmltopdf is a great utility and we rely on it heavily.
- forapurpose 8y agoThe article talks about wkhtmltopdf; in fact, they developed their server in response to its limitations: The wkhtmltopdf utility has been around awhile and works great when you get it working correctly on your platform. However, the newest version as of this writing 0.12.5 has a bug prevening TOC generation on some platforms. Some Linux platforms require the installation of Microsoft font packs, and compiling from source leads you down a rabbit hole of dependency hell.