rdvojmoc / DinkToPdf

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
MIT License
1.09k stars 417 forks source link

Cannot make it work - issues with wkhtmltopdf library #52

Closed SirePi closed 6 years ago

SirePi commented 6 years ago

I'm having issues with the library, as in that I can't make it work; I tried both 32 and 64 bit versions of wkhtmltopdf (v.0.12.4 downloaded from this git), with the following results: 64bit: I get a BadImageFormatException 32bit: I get that _"a call to PInvoke function 'DinkToPdf!DinkToPdf.WkHtmlToXBindings::wkhtmltopdfinit' unbalanced the stack. This could happen when the managed PInvoke signature doesn't correspond to the unmanaged signature"

using VS2017 professional 15.5.7 on Windows 10 64 bit (v.1803) .net standard 2.0 library loaded from a .net 4.6.1 project

Any help?

[EDIT] I just noticed issue #38, and I'm thinking that might be my case - as in, the library only works from .net Core and not from the full framework. Can anyone confirm?

SirePi commented 6 years ago

Yep, can confirm that loading from a .net Core console application it works properly. Closing this.