pruiz / WkHtmlToXSharp

C# wrapper wrapper (using P/Invoke) for the excelent Html to PDF conversion library wkhtmltopdf library.
239 stars 84 forks source link

Unable to load DLL 'wkhtmltox0' #31

Closed doktrova closed 8 years ago

doktrova commented 9 years ago

"Unable to load DLL 'wkhtmltox0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" I have added it on the bin file manually. I also have tried both x86 and 64 bit. And have build the project on either one or the other instead of the Any CPU. Any other suggestions?

jhackney commented 9 years ago

doktrova, were you able to resolve your issue? I'm running into the same thing and having a difficult time understanding what is going on.

doktrova commented 9 years ago

No I couldn't resolve it in time and the deadline for the project was approaching so I ended up using wkhtml as a process instead of using this wrapper.

jhackney commented 9 years ago

Thank you for the quick response!

Jonas

On Wed, Mar 4, 2015 at 4:39 PM, Don Oktrova notifications@github.com wrote:

No I couldn't resolve it in time and the deadline for the project was approaching so I ended up using wkhtml as a process instead of using this wrapper.

— Reply to this email directly or view it on GitHub https://github.com/pruiz/WkHtmlToXSharp/issues/31#issuecomment-77255062.

Thanks, Jonas Hackney

pruiz commented 8 years ago

It looks like you were not registering your native bundle during library's initialization.

JulianMay commented 8 years ago

I'm stuck with the same problem - could you elaborate on "It looks like you were not registering your native bundle during library's initialization."? How does one do that? Thanks

pruiz commented 8 years ago

Hi @JulianMay,

Each required of the native bundles containing platform-specific dll binaries, have to be registered during the application's initialization, so WkHtmlToXSharp can deploy them on first invocation.

You can see an example inside the unit-tests at: https://github.com/pruiz/WkHtmlToXSharp/blob/master/WkHtmlToXSharp.Tests/PdfConverterTests.cs#L28

JulianMay commented 8 years ago

Thanks!