Sicos1977 / ChromiumHtmlToPdf

Convert HTML to PDF with a Chromium based browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chrome exited unexpectedly, at ChromeHtmlToPdfLib.Converter.StartChromeHeadless()

cd-linxi opened this issue · comments

image
The local Windows development environment is running properly, and an error is reported when you put it on the Ubuntu20.04 server. What is the reason for this?
Dockerfile added content to download and install Chrome.
image

commented

I don't have any experience with using it on Linux. I think the best is to contact @vitovanjak he also got it to run on Linux

See this issue --> #72

Did you add converter.AddChromeArgument("--no-sandbox") tag in code?

Maybe you can post code snippet also so I can check it out

Add converter.AddChromeArgument("--no-sandbox") and try then

image
Now it's another error. Do you need to add any parameters?

Before you post an error at least read it, it is self-explanatory.

It can't find the file you are referring to in the htmlUrl variable.

Please post a snippet where you are generating that file and path and saving it...

Thank you for your help. @vitovanjak