I’m trying to generate PDF from html templates. I’m using a layer with puppeteer-core and @sparticuz/chromium-min libraries. I added this layer in a Lambda function.
As far as I know this chromium-min library doesn’t have some files that are needed. So you need to download them. Following the example of this link: https://github.com/Sparticuz/chromium/blob/master/examples/remote-min-binary/index.js
I’m still not able to render the html. I got the following error:
/tmp/chromium: cannot execute binary file
I’m using Lambda with Nodejs 16.x as runtime
I have tried the two approaches Sparticuz has in the github examples, getting the missing files from githib link and download the layer version and add it to the lambda
dalaz95 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.