dinktopdf

DinkToPdf Library Unable to load shared library 'Shell32.dll'

ε祈祈猫儿з 提交于 2021-02-11 17:04:30
问题 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

DinkToPdf Net Core not able to load DLL files

爱⌒轻易说出口 提交于 2021-01-27 13:46:23
问题 I am try to generate PDF from html sql server database using DinkToPdf library. In the Startup file I have added var context = new CustomAssemblyLoadContext(); context.LoadUnmanagedLibrary(Path.Combine(Directory.GetCurrentDirectory(), "libwkhtmltox.dll")); The line gives me error on launching the web app DllNotFoundException: Unable to load DLL 'C:\Program Files\IIS Express\libwkhtmltox.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT:

Separating Page Breaks with DinkToPdf

萝らか妹 提交于 2019-12-11 09:02:40
问题 I have this C# in my Program.cs: var page = "plain"; var slnpath = $@"{Directory.GetCurrentDirectory()}\..\..\..\.."; var htmlpath = $@"{slnpath}\HtmlTemplates\{page}.html"; var pdfpath = $@"{slnpath}\PdfFiles\{page}.pdf"; var dllpath = $@"{slnpath}\DinkNative64bit\libwkhtmltox.dll"; var html = new StringBuilder(File.ReadAllText(htmlpath)); var _converter = new SynchronizedConverter(new PdfTools()); var context = new CustomAssemblyLoadContext().LoadUnmanagedLibrary(dllpath); var