5 ms·
Cool. Nice to learn of another option. What would be the advantages of using this over wkhtmltopdf (https://wkhtmltopdf.org https://wkhtmltopdf.org) ?
by placebo 9y ago
Cool. Nice to learn of another option. What would be the advantages of using this over wkhtmltopdf (https://wkhtmltopdf.org https://wkhtmltopdf.org) ?
- simion314 9y agoI 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 https://github.com/GoogleChrome/puppeteer/issues/666
- kimmobru 9y agoThanks 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.
- cvsh 9y agowkhtmltopdf 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.