I have a problem implementing dinkToPdf NuGet Package in my .NET 6.0 WebAPI application. I'm using macbook with M1 chip.
I'm getting the following error:
"Unable to load shared library '/Users/vlatkopetrushevski/Desktop/Work/TechUp/Back End/academy-management-api/Skillup.API/wkhtmltox/v0.12.4/64 bit/libwkhtmltox.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/vlatkopetrushevski/Desktop/Work/TechUp/Back End/academy-management-api/Skillup.API/wkhtmltox/v0.12.4/64 bit/libwkhtmltox.dylib, 0x0001): tried: '/Users/vlatkopetrushevski/Desktop/Work/TechUp/Back End/academy-management-api/Skillup.API/wkhtmltox/v0.12.4/64 bit/libwkhtmltox.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))"
Anyone with the same problem?
I managed to find the library for arm64, its located on: https://ports.macports.org/port/wkhtmltopdf/
First install MacPorts for your OS: https://guide.macports.org/chunked/installing.macports.html
Then run this command in terminal:
sudo port install wkhtmltopdfAfter the installation is complete write in terminal:
port contents wkhtmltopdfto check what files are installed by wkhtmltopdf. It will show a list like this:Port wkhtmltopdf contains:
Copy the libwkhtmltox.0.12.3.dylib and rename it to libwkhtmltox.dylib, add the new file on the lib folder inside your project and you are ready to go.