3 ms·
I think alot of people have moved on and are using services or puppeteer to generate their pdf's i know we did since we couldnt find a library that worked prope
by dustymcp 4y ago
I think alot of people have moved on and are using services or puppeteer to generate their pdf's i know we did since we couldnt find a library that worked properly for our usecase.
- paranoidrobot 4y agothe 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)