Szpadel / chrome-headless-render-pdf

223 stars 67 forks source link

GenerateSinglePdf function not working in docker #38

Closed AshwinJd closed 5 years ago

AshwinJd commented 6 years ago

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

Szpadel commented 6 years ago

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

AshwinJd commented 6 years ago

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?

Szpadel commented 6 years ago

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

khanhhua commented 5 years ago

Should close this issue.

AshwinJd commented 5 years ago

Thanks