In fact, there's a command line switch for it https://developers.google.com/web/updates/2017/04/headless-c...
The Chrome team also make Puppeteer, a node's library for interfacing with headless chrome, and has methods for making PDFs as well https://github.com/GoogleChrome/puppeteer
--print-to-pdf
https://developers.google.com/web/updates/2017/04/headless-c...
It's really easy to do using [puppeteer](https://github.com/GoogleChrome/puppeteer). The 2nd or 3rd example is PDF.
In fact, there's a command line switch for it https://developers.google.com/web/updates/2017/04/headless-c...
The Chrome team also make Puppeteer, a node's library for interfacing with headless chrome, and has methods for making PDFs as well https://github.com/GoogleChrome/puppeteer