fpanaccia / Wkhtmltopdf.NetCore-deprecated

Rotativa + Net Core
The Unlicense
220 stars 94 forks source link

Fix error when redirecting stream from wkhtmltopdf.exe #2

Closed biggray closed 5 years ago

biggray commented 5 years ago

Hello again,

Sorry to bother you again so soon. 😅 I've made change to fix following error when using it on windows:

System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams. at Wkhtmltopdf.NetCore.WkhtmlDriver.Convert(String wkhtmlPath, String switches, String html) at Wkhtmltopdf.NetCore.HtmlAsPdf.GetPDF(String html) ...

Just handle this merge request at your spare time. Thank you very much!

fpanaccia commented 5 years ago

Hi, no problem...quick question....are you developing in net "full framework", right?, because by default in net core that parameter is set in false, and i have tested this library in windows with docker and whitout docker and i do not had this error (or at least i do not remember it).

biggray commented 5 years ago

Yes, I observed this issue on .net framework 4.61 deployments. We are migrating our solution from tranditional .net framework to .net core. So we have deployments of both build targets. Sorry that I didn't make it clear which led to your confusion. Will make things clear in future.

Thanks!😁

biggray commented 5 years ago

Hi fpanaccia, Can you please also help publish a new version of nuget package? It'll be great then. Really thank you!

fpanaccia commented 5 years ago

Hi, done that....please have in mind that soon i will make a change in the razor library to make it more compatible (at least that is the idea).

biggray commented 5 years ago

OK. Got it. Thanks!