Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Executable not found" when running .NET Core 2.2 #11

Open
alexeaztman opened this issue Dec 23, 2020 · 2 comments
Open

"Executable not found" when running .NET Core 2.2 #11

alexeaztman opened this issue Dec 23, 2020 · 2 comments

Comments

@alexeaztman
Copy link

alexeaztman commented Dec 23, 2020

Exception is thrown when trying to find the executable path to wkhtmltopdf.exe

"Executable not found.":"C:\\Users\\<user>\\.nuget\\packages\\pugpdf.core\\1.0.8\\lib\\netstandard2.0\\wkhtmltopdf\\windows\\x64\\wkhtmltopdf.exe"}

@rdhainaut
Copy link

rdhainaut commented Jan 18, 2021

Workaround:
Create the following structure in your solution =>
wkhtmltopdf/{OS}/{architecture}/wkhtmltopdf.exe => for windows wkhtmltopdf/windows/x64/wkhtmltopdf.exe
then in VS Properties "Copy to Output Directory": "Copy always"

It should works

Edit: I have an issue after to have deployed on Azure (executable not found)
I have fond no solutions with this library so i have switched to another wrapper for wkhtml (and handle manually the path of wkhtml.exe via an available option) https://github.com/cp79shark/Shark.PdfConvert

@pug-pelle-p
Copy link
Owner

I'm assuming that the code is copying the file to the incorrect folder. I'm thinking of instead doing this in the nuget project, just include the binary within the application and unpack it on initial run. But I haven't gotten around to it, so if someone wants to help out with this I'm more than happy to approve a PR for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants