Unable to load DLL ‘ABCpdf9-64.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E)

12.1k views Asked by At

I have installed abcPDF 9.1.1.5 version on my local machine and everything works perfectly. but I deploy code to windows server 2008 R2 machine i get this error.

any one guide me what could be the issue.

I have already explored following articles and this is not working for me.

1 and 2

Code:

string strFileName = Invoice.InvoiceNumber;
XSettings.License = "something-something-something";
Doc m_GeneratePDF = new Doc();
m_GeneratePDF.HtmlOptions.Engine = EngineType.Gecko;
StringBuilder strBuilderHTML = new StringBuilder();
string strHTML;
strBuilderHTML.Append("<HTML>");
strBuilderHTML.Append("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />");
strBuilderHTML.Append("<head>");
//strBuilderHTML.Append("<link href='styles/Site.css' rel='stylesheet' type='text/css' />");
strBuilderHTML.Append("</head>");
strBuilderHTML.Append("<BODY>");
strHTML = strBuilderHTML.ToString();

theID = m_GeneratePDF.AddImageHtml(strHTML);

That are relevant to my problem.

4

There are 4 answers

2
UMAR-MOBITSOLUTIONS On BEST ANSWER

Finally after fighting with this issue 3 days i solved it.

here is what i did: 1) I was publishing the code from 32 bit machine windows 8 2) my server was windows server 2008 R2 64bit machine.

=>I enabled 32bit applications from iis options which never solved my problem as per googling then i => set "Load User profile" which again never solved my problem. =>then somebody told me give full rights to abcPDF and abcGeco dlls on your server that also never worked.

Then i finally, compiled my code from 64bit machine OR i copied 64bit ABCpdf & ABCGeco dll files from bin folder into my published folder that finally worked.

0
Andy Borgmann On

This probably won't be too helpful here. But I struggled with this as well from an inherited project after a Windows Update broke a very old implementation of ABCPDF within an ASP.NET web application. I am not saying you should repeat these steps, but I am putting all these steps in here in case it helps someone else identify what they might need to do. Also, I was on ABCPDF10, but I don't see why this wouldn't work for any version.

  1. I installed 64-bit ABCPDF10, and then installed 32-bit ABCPDF10 via the MSI for each.
  2. I then copied the files in their respective C:/Program Files directories into the bin/ of my project manually per ABCPDFs instructions. This didn't work for me because when I went to build in VS2015 it couldn't see the .DLL for some reason.
  3. I then uninstalled it by deleting the files out of my project bin/ manually and then using Add/Remove Apps in Server2012R2.
  4. I then used Nuget to download ABCPDF and that worked and it could build. But I still needed ABCPDF.Gekco
  5. I then used Nuget to try and install ABCPDF.Gecko. This downloaded it, but it didn't install it fully. I manually copied over the missing .dlls and .exe into the bin/ directory and Built the project.
  6. It is at this point I got stuck with the error message from the original poster.
  7. What worked for me here is I left the Project and bin/ directory alone and I then used the .MSI installer and re-installed only the x64 version to the C:/ like any other program. I didn't have to copy any files. I just re-built the project and boom! That worked.

It feels to me like a registry key/path issue. But I have no idea if that is right.

Hopefully that helps someone else.

0
JimiSweden On

Just want do add my solution:
Install ABCpdf (in my case "ABCpdf.NET64.exe") on the server, that´s all. (You could probably copy some dll files around to fix the problem)

for the error:
Unable to load DLL 'ABCpdf10-64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Environment (all x64)
Prod: Windows Server 2012 R2 Dev: Windows 10, Visual Studio 2015

0
Aquaphor On

What worked for me.

  1. Install newest version / version that the error complains is missing

Unable to load DLL ‘ABCpdf12-64.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E)

  1. Build and Run. If this works, then congrats. Solved. Skip all other steps.

    • If this doesn't work, you should get an error complaining about a version mismatch. And it should list the version that it requires. Go to step 3
  2. Install correct version from NuGet gallery: https://www.nuget.org/packages/ABCpdf.ABCGecko/12.3.0.5

  3. Go to ..\solution\packages\ABCpdf.[version number]\build\ and copy ABCpdf12-64.dll file to ..\solution\project\Bin\

  4. Build and Run

This worked for me