3 ms·
the tl;dr of using Puppeteer for this is "We run Chrome in a headless mode, load your page, and then print to PDF with it". It makes me nervous having Chrome r
by paranoidrobot 4y ago
the tl;dr of using Puppeteer for this is "We run Chrome in a headless mode, load your page, and then print to PDF with it".
It makes me nervous having Chrome running on the server, even inside a container without root. Doubly so if the user is able to control any portion of the page being run by Chrome.
- whitexn--g28h 4y agoWe used aws lambdas to execute the pdf renders and upload the result to s3 using a signed url passed in from the request. Complete insulation from our own application process, all of data is passed into the request so the worst the user can do is add a malicious file to our s3 bucket.
- paranoidrobot 4y agoAre you using Puppeteer for the PDF Rendering? Chrome is pretty horrific in terms of memory usage. How are you handling the startup time + memory usage? (with their associated costs)