News for hackers. Stuff that matters.
Re:URL to PDF Microservice by placebo on Thursday October 05, 2017 @11:40AM (#15410040)
Cool. Nice to learn of another option. What would be the advantages of using this over wkhtmltopdf (https://wkhtmltopdf.org) ?
Re:URL to PDF Microservice by kimmobru on Thursday October 05, 2017 @11:54AM (#15410167)
Thanks for the comment! I haven't personally used wkhtmltopdf much, but I like having Chrome as the rendering engine. In theory at least, debugging the PDFs can be done with desktop Chrome's print preview. I don't know about wkhtmltopdf, but url-to-pdf-api supports dynamic single-page apps, which can be beneficial depending on the use case.

Headless Chrome is quite new so it still has some bugs, but I have a hunch that it will in the end have most reliable and expected render results.

Re:URL to PDF Microservice by simion314 on Thursday October 05, 2017 @11:46AM (#15410080)
I am testing pupeter/headless chrome, pdf export stil has some bugs, I hit an issue with page sizing and I am stil using wkhtmltopdf for now, the bug is present in main Chrome save as PDF. Chrome has better font rendering and it knows to embed the web fonts into the pdf where in wkhtmltopdf I have to do it manually.

Link to size bug: https://github.com/GoogleChrome/puppeteer/issues/666

Re:URL to PDF Microservice by cvsh on Friday October 06, 2017 @07:03AM (#15415796)
wkhtmltopdf is based on QTWebKit, which is truly a pain in the ass to work with. Way more bugs and much less support for modern CSS than Chromium.