Copy link to clipboard
Copied
I'm getting an exception occasionally when loading a PDF in C# code.
This is the information:
Source: Interop.AcroPDFLib
Message: Error HRESULT E_FAIL has been returned from a call to a COM component.
Stack Trace: at AcroPDFLib.IAcroAXDocShim.LoadFile(String fileName)
at AxAcroPDFLib.AxAcroPDF.LoadFile(String fileName)
This is the line of code throwing the exception: m_axAcroPDF.LoadFile(m_fileName);
The file is located on the network, but when I view the files, they are opening fine.
Does anyone know what could be causing this error or workarounds so that I can re-attempt to load the PDF again automatically without the exception?
Thanks for the help in advance!
Copy link to clipboard
Copied
We need a LOT more information here...
- Acrobat or Reader installed?
- What version?
- You say this is in C# code - but in what environment? App? Browser? other?
- What do you mean that "the file is located on a network"? Over HTTP? SMB? Other?
- What information is included in the exception? Your catching it will give you error #'s and messages. What are they?
Copy link to clipboard
Copied
Here are the answers to your questions:
- Acrobat or Reader installed?
Acrobat and Reader are both installed
- What version?
Both version 9.0
- You say this is in C# code - but in what environment? App? Browser? other?
A Windows Desktop Application hosted on Citrix.
- What do you mean that "the file is located on a network"? Over HTTP? SMB? Other?
The network location looks like this: \\server\folder\file.pdf
- What information is included in the exception? Your catching it will give you error #'s and messages. What are they?
The exception message was: "Error HRESULT E_FAIL has been returned from a call to a COM component."
The stack trace points to the LoadFile() method:
at AcroPDFLib.IAcroAXDocShim.LoadFile(String fileName)
at AxAcroPDFLib.AxAcroPDF.LoadFile(String fileName)
This exception doesn't happen every time the file is opened, so it seems the PDF is OK.
The PDF versions are: 1.6 and 1.7
Copy link to clipboard
Copied
Thanks – that helps me to give you an answer, but not one you will be happy with.
Adobe no longer supports Acrobat & Reader 9 – we haven’t for 3 years now. (see https://helpx.adobe.com/acrobat/kb/end-support-acrobat-8-reader.html)
In addition, Acrobat and Reader 9 were the first versions to be supported on Citrix. And MANY issues were found.
Copy link to clipboard
Copied
If we upgrade to Acrobat and Reader 11.0, do you think the problem will go away?
Copy link to clipboard
Copied
You have a much better chance of it working – that’s for sure!
Copy link to clipboard
Copied
With Acrobat 11.0, I am now getting a 523:523 error:
Copy link to clipboard
Copied
Try disabling protected mode.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now