4 ms·
How is it different from, let's say: chrome --headless --disable-gpu --print-to-pdf https://www.google.com/ https://www.google.com/
by dananjaya86 8y ago
How is it different from, let's say:
chrome --headless --disable-gpu --print-to-pdf https://www.google.com/ https://www.google.com/
- vincnetas 8y agoIt uses puppeteer so basically it's chrome under the hood.
- cronopios 8y ago--print-to-pdf is very limited. As soon as you need to control anything, you have to use [Puppeteer](https://developers.google.com/web/tools/puppeteer/ https://developers.google.com/web/tools/puppeteer/)
- danburzo 8y agoAs @cronopios mentions, if you need a bit of flexibility in the output, you need to use a wrapper over Chromium — either Electron, or (the more recent) Puppeteer. Other than that, it runs the article through Readability to extract just the main content and applies customizable CSS / HTML to it.