Open anking opened 5 years ago
dll's in the location are compatible, I have my 2.1 core project in production with these dlls. Please check my problem I had before https://github.com/rdvojmoc/DinkToPdf/issues/25#issuecomment-477205608
dll's in the location are compatible, I have my 2.1 core project in production with these dlls. Please check my problem I had before #25 (comment)
I tried your solution without any luck, i also tried downloading it from here https://github.com/wkhtmltopdf/wkhtmltopdf/ this gives a bigger (39Mb) file, but still have the same issue. VS keeps saying it is incompatible :(
what does your .csproj look like?
I have dinktopdf working just fine, dlls and all, in a ASP.NET Core 2.1 project. In my project's .csproj i added them like:
`
`
My project structure is "{solution folder}/{project folder}/v0.12.4/..."
Edit: sorry i can't make the code above look nicer Edit 2: Project structure example i posted could not be viewed
I'm using .NET Core 2.2 and after some fixes I got it working now, including on Linux, Mac and Windows. I've forked the project here https://github.com/hakanl/DinkToPdf and also uploaded it to NuGet with all the dependencies (binaries) for wkhtmltopdf https://www.nuget.org/packages/Haukcode.DinkToPdf
@HakanL I installed your version, it works fine locally but when I deploy it to an Azure App Service, it doesn't work anymore with the error :
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
I tried to run my App service on 32 and 64 but it has no effect on the issue.
Any idea ?
Hmm, I haven't had a chance to try it on Azure, but I run it fine under Windows. It seems it would load the wrong 32/64 version. Can you try it locally (Windows) on both 32 and 64 bit and make sure the correct DLL is loaded? You can open an issue on my repo as well if you want.
I managed to make the lib work on every OS and either 32 or 64 runtimes there: https://github.com/HakanL/DinkToPdf/issues/8
@HakanL I installed your version, it works fine locally but when I deploy it to an Azure App Service, it doesn't work anymore with the error :
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
I tried to run my App service on 32 and 64 but it has no effect on the issue. Any idea ?
In my case it is working on Azure AppService for Windows
The Azure App Service may be too restrictive, I don't know, this package is using a native library so there may be something there. Unfortunately I don't have a good way to troubleshoot this, feel free to share a solution if you can find one.
The Azure App Service may be too restrictive, I don't know, this package is using a native library so there may be something there. Unfortunately I don't have a good way to troubleshoot this, feel free to share a solution if you can find one.
My implementation is straight forward as described in the TestWebServer project. The only interesting thing to mention is, maybe, in the ObjectSettings, I am not setting a Page but a HtmlContent string. As for now, I am not having any issues on Azure AppService.
But was that where you had to add all the binaries to your main project? The goal of this wrapper was so you don't have to add the binaries to your main project, and it works in all scenarios, except Azure App Service, for some reason.
Anyone came to a solution? I'm having this problem right now
Anyone came to a solution? I'm having this problem right now
Is your issue with .NET Core 2.1, or with Azure App Services? And more importantly, are you using the old DinkToPdf, or the updated https://github.com/HakanL/WkHtmlToPdf-DotNet project?
Anyone came to a solution? I'm having this problem right now
Is your issue with .NET Core 2.1, or with Azure App Services? And more importantly, are you using the old DinkToPdf, or the updated https://github.com/HakanL/WkHtmlToPdf-DotNet project?
I was having problem with Azure App Service, but I used WkHtmlToPdf-DotNet and it worked flawlessly.
When i try to make a reference for the 64 bit version of this file(libwkhtmltox.dll) in my Core 2.1 project i have this error coming up for me:
Therefore when i publish my project I have to manually copy this dll in executables directory. Is there a way this can be fixed? Or is there a version that is compatible with core 2.1?
I downloaded mine here: https://github.com/rdvojmoc/DinkToPdf/blob/master/v0.12.4/64%20bit/libwkhtmltox.dll