DinkToPdf icon indicating copy to clipboard operation
DinkToPdf copied to clipboard

Unable to load libwkhtmltox.dll in xamarin.mac

Open Ravi15 opened this issue 4 years ago • 1 comments

I have tried putting dll almost everywhere, in root folder, in bundle but it always throw exception saying unable to found dll. I would really appreciate any help.

Ravi15 avatar Sep 20 '19 04:09 Ravi15

On your project, you need to go to Native references -> Add native reference and add libwkhtmltox.dylib 64 bits (or 32 depending on the architecture). Then it will be referenced.

You can further debug what's going on by going to the terminal and execute:

MONO_LOG_LEVEL=debug MONO_ENV_OPTIONS=--trace=E:all MyApp.app/Contents/MacOS/MyApp > MyApp.o.txt 2> MyApp.e.txt

and after running your app check those txt files to see what's going on with the library

Also, this is a good article on how to include C dyanmic libraries in Xamarin.Mac

HIH

fedemkr avatar Sep 24 '19 20:09 fedemkr