I've tried using getObject from s3, convert the html file into string, then using puppeteer and setContent (+ waitUntil with all flags) and then uploading the PDF to s3 again (used Buffer.from(pdf, 'base64')) but I get a blank page when I open the file. Any ideas?
my html string starts with <!DOCTYPE ...
should I remove that? or setContent wiped all page html data before it sets the new string I provide?
Also, I do have some script that fetch JS code and assets inside the html.
So I would guess HTML part is okay. I would suggest to debug the setup by trying the code only with puppeteer and simple html and then including javascript elements to pinpoint the part where it starts to fail.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've tried using getObject from s3, convert the html file into string, then using puppeteer and setContent (+ waitUntil with all flags) and then uploading the PDF to s3 again (used Buffer.from(pdf, 'base64')) but I get a blank page when I open the file. Any ideas?
my html string starts with <!DOCTYPE ...
should I remove that? or setContent wiped all page html data before it sets the new string I provide?
Also, I do have some script that fetch JS code and assets inside the html.
The result of the PUG template used in an article looks like this:
So I would guess HTML part is okay. I would suggest to debug the setup by trying the code only with puppeteer and simple html and then including javascript elements to pinpoint the part where it starts to fail.