Unable to load DLL 'DPDFRenderNative_x86'

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Rasterizer for .NET (v2.x)  /  Display Thread

DynamicPDF Rasterizer for .NET (v2.x) Forum

Side note, your Forum dropdown when posting a new message does not list Rasterizer v3.

I'm getting "Unable to load DLL 'DPDFRenderNative_x86': The specified module could not be found." on a published app when it worked fine locally on my dev machine. Full error at the end.

It seems to work fine on my machine regardless if I specify x86 or x64. It's a .NET Framework 4.8 app running under ASP.NET Core. I'm using the most recent nuget package in my project for this.
When I check the folder on our server, both the 32 and 64 bit files are in the same folder as the apps main executable. I though maybe I was missing a dependency, but the documentation says no VC++ redist is needed for DynamicPDF.Rasterizer.NETFramework40.dll. I tried adding it anyway (the 2015-2019 version), but it had no impact.

The server is running 2012 R2, but I don't think that's related in this case?

Not sure how else to troubleshoot this one.

 An unhandled exception occurred while processing the request.
DllNotFoundException: Unable to load DLL 'DPDFRenderNative_x86': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
ceTe.DynamicPDF.Rasterizer.RenderNativeWin32.a(IntPtr A_0, int A_1, IntPtr A_2, ref ulong A_3)

DllNotFoundException: Unable to load DLL 'DPDFRenderNative_x86': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
ceTe.DynamicPDF.Rasterizer.RenderNativeWin32.a(IntPtr A_0, int A_1, IntPtr A_2, ref ulong A_3)
ceTe.DynamicPDF.Rasterizer.RenderNativeWin32.ak(IntPtr A_0, int A_1, IntPtr A_2, ref ulong A_3)
ceTe.DynamicPDF.Rasterizer.PdfiumUtilityClass.a(IntPtr A_0, int A_1, IntPtr A_2, ref ulong A_3)
ceTe.DynamicPDF.Rasterizer.InputPdf..ctor(byte[] data)
Did some more digging This is all regarding the Nuget package v3.4.0.39186 by the way. I could be way off base with all this but I'm grasping at straws as to why this refuses to work after being deployed.

It seems that the assumption with errors like this, that one of the dependencies is missing. So I found out that the sysinternals Process Monitor tool can help track down the file(s) it is trying to access. That thing is a massive dump of information, but I was able to find out it's failing to find a dll called winfax.dll. I verified that it was the DPDFRenderNative file that was causing this by running the C++ tool dumpbin to view it's dependencies. and I got the following list

WINFAX.dll
gdiplus.dll
KERNEL32.dll
USER32.dll
GDI32.dll
WINSPOOL.DRV
ole32.dll

So while it seems like that's the cause, I'm not sure why that file is needed, or why it's missing from the server? Will that lack of this file prevent the rasterizer from working?

Ok, so against my better judgement, I coped the winfax.dll file from the c:\windows\system32\ folder on my windows 10 dev machine, into the application folder on the 2012 R2 server (since that's the the first place it looks according to process monitor), and the app works now. What the hell? Why is winfax.dll needed? And since it is obviously, where do I find it officially for a Microsoft OS rather than cannibalizing it from a different system, and why is it not listed as a requirement in the documentation?
I also tried to deploy to a brand new clean 2019 server install and ran into the exact same problem. Again, copying in the winfax.dll file fixed my problem.

What is the legitimate way to get this file into the system32 folder? Was it mistakenly added as a dependency with 3.4? Because I don't remember needing it before.
Posted by a ceTe Software moderator
Hi,

Thanks for reporting this issue and for all the details you provided. The winfax.dll should not be a dependency of DynamicPDF Rasterizer. We expect to release a fix for this tomorrow.

Thanks,
ceTe Software Support Team
Posted by a ceTe Software moderator
Hi,

The update has been posted to Nuget and our site. Please download v3.05 to resolve the issue.

Thanks again for all the details you provided on this issue. It helped us find and resolve the issue quickly.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 12:12 PM.