3 ms·
They do. You can use something like puppeteer to use a headless Chrome or Firefox to generate PDFs from HTML for you. https://github.com/puppeteer/puppeteer/bl
by jhoh 6y ago
They do. You can use something like puppeteer to use a headless Chrome or Firefox to generate PDFs from HTML for you.
https://github.com/puppeteer/puppeteer/blob/v5.3.1/docs/api.md#pagepdfoptions https://github.com/puppeteer/puppeteer/blob/v5.3.1/docs/api....
- hnedeotes 6y agoYeap, I used this, but I had to setup a lambda, then get chrome in it, then use puppeteer. If this was something that you could programatically trigger from JS then you could have a button "Export to PDF" and just make a downloadable blob, because the rendering is pretty good and with css @media for print you can really make it tight.
- williamsmj 6y agoYou don't need to use pupeteer: https://developers.google.com/web/updates/2017/04/headless-chrome#create_a_pdf https://developers.google.com/web/updates/2017/04/headless-c...