DinkToPdf icon indicating copy to clipboard operation
DinkToPdf copied to clipboard

Unable to load shared library 'Shell32.dll' on Debian 9

Open wasyster opened this issue 4 years ago • 0 comments

I am using DinkToPdf Library for pdf generation, but I encountered on a problme on Debian 9. I changed CustomAssemblyLoadConext to load the .so file like this

#region DinkToPDF #if DEBUG string filePath = $@"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\libwkhtmltox.dll"; #else string filePath = $@"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\libwkhtmltox.so"; #endif CustomAssemblyLoadContext context = new CustomAssemblyLoadContext(); context.LoadUnmanagedLibrary(filePath); serviceCollection.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools()));

On Windows it is working perfect. On Linux (Debian 9) when I hit the controller to get a pdf file I got an error:

"Unable to load shared library 'Shell32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libShell32.dll: cannot open shared object file: No such file or directory"

wasyster avatar Apr 09 '20 16:04 wasyster