Reputation: 1131
I am trying to generate PDF using Google Chrome Headless, using this code in ASP.NET Core 2.2:
string args = $"--headless --disable-gpu --print-to-pdf={targetFile} {file}";
string chrome = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
ProcessStartInfo inkscapeInfo = new ProcessStartInfo(chrome, args);
Process inkscape = Process.Start(inkscapeInfo);
inkscape.WaitForExit(5000);
It works great in my local computer and Visual Studio but when I upload it to the Windows 2016 Server It does't work, I checked the chrome.exe path and it was correct on the server. Actually I tried some other possible solutions but it seem no exe file fires not only headless chrome, what should I do?
Upvotes: 1
Views: 476
Reputation: 1131
Finally I found a solution!
None of them worked alone!
Upvotes: 1