Hacker News new | ask | show | jobs
by jhoh 1913 days 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....

2 comments

Yeap, 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.