AmirTugi / tea-school

Simplified HTML + CSS --> PDF Generator for Nodejs
343 stars 31 forks source link

PDF Generation is cut off after # is found in the html. #15

Closed ozzyonfire closed 5 years ago

ozzyonfire commented 5 years ago

Looks like it's a puppeteer issue.

https://github.com/GoogleChrome/puppeteer/issues/3736

I fixed it by using this line before the pdf generation: await page.setContent(renderedTemplate, {waitUntil: 'networkidle0'});

Maybe we should use setContent instead of goto? I'm not very familiar with puppeteer, so I'm not sure what the repercussions would be.

AmirTugi commented 5 years ago

Hey, I've updated the package to support the setContent of Puppeteer. Can you tell me if the issue is now resolved?

ozzyonfire commented 5 years ago

Looks great! Everything is rendering properly now. Thanks, Amir.