andrei-m-code / net-core-html-to-image

.NET Core HTML to Image converter
MIT License
127 stars 54 forks source link

System.ComponentModel.Win32Exception has been thrown #1

Open salamohamad opened 5 years ago

salamohamad commented 5 years ago

Hi, Thank you so much for this tool! Whenever I try the Program I ran into this exception: System.ComponentModel.Win32Exception has been thrown Permission Denied I have Visual Studio on MacOS! If you know the root of this problem please let me know! Again thanks a lot!

andrei-m-code commented 5 years ago

@salamohamad yw! I think the issue is in the embedded wkhtmltoimage.exe that is probably a windows version. The easiest option for you would be to re-compile with a different version of the tool (https://wkhtmltopdf.org/downloads.html). Or ideally we as a community should figure out how to maybe download and install the right version of the tool on a machine. Server might be needed for it.

--

I have another idea... We could check if the tool is available from the console (installed), use that version, otherwise copy the embedded one. This will work in your case after you install wkhtmltoimage on your mac.

--

And finally, I'll look here (https://github.com/wkhtmltopdf/wkhtmltopdf/releases) there is a -cross- version there. If I'm not mistaken and its a cross-platform version of the tool, I'll embed it instead.

Charly6596 commented 5 years ago

Any news about using the cross-platform version? @andrei-m-code I've forked and modified this a bit to be able to specify another wkhtmltopdf, and found this issue before creating a PR