Szpadel/chrome-headless-render-pdf

GenerateSinglePdf function not working in docker

AshwinJd opened this issue · 5 comments

The generateSinglePdf function is not working inside the docker container. Does it have something to do with the chrome binary path.?

This is probably issue with chrome issues when running as root without --no-sandbox,
Try running with {chromeOptions: ['--no-sandbox']}

That solved the issue, but now how will I handle redirections, I have an image to be loaded on to the html which has multiple redirections, but now the image doesnt load up inside the pdf. How can I handle multiple redirections now?

If it is able to load inside webpage it should also be visible in pdf, try printing to pdf from normal chrome instance to debug issue

Should close this issue.

Thanks