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

Executeable not found in dotnet Net6 core #15

Open
rhourani-kassavirtanen opened this issue Jan 20, 2022 · 3 comments
Open

Executeable not found in dotnet Net6 core #15

rhourani-kassavirtanen opened this issue Jan 20, 2022 · 3 comments

Comments

@rhourani-kassavirtanen
Copy link

Debugged the code locally and the path of the wkhtmltopdf.exe points to a folder outside the project, "AppData\Local\AzureFunctionsTools\Releases\4.10.1\cli_x64"

It works when you place the executable file there but I could not now where is points when deploying the code to the server

@rhourani-kassavirtanen
Copy link
Author

After many hours of debugging, it looks in this directory:

System.IO.FileNotFoundException: Executable not found.
Application:File name: 'D:\Program Files (x86)\SiteExtensions\Functions\4.0.1\64bit\wkhtmltopdf\windows\x64\wkhtmltopdf.exe'
Application: at PugPdf.Core.WkHtmlToPdfDriver.GetPath()
Application: at PugPdf.Core.WkHtmlToPdfDriver.ConvertAsync(String html, String switches)
Application: at PugPdf.Core.HtmlToPdf.RenderHtmlAsPdfAsync(String html)

@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

@tnlthanzeel
Copy link

@rhourani-kassavirtanen , were you able to find a solution for this?

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