Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AcroPDFLib.IAcroAXDocShim.LoadFile(String fileName), Error HRESULT E_FAIL has been returned from a call to a COM component.

New Here ,
Apr 27, 2016 Apr 27, 2016

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!

TOPICS
Acrobat SDK and JavaScript
5.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 28, 2016 Apr 28, 2016

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2016 Apr 28, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 28, 2016 Apr 28, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2016 Apr 28, 2016

If we upgrade to Acrobat and Reader 11.0, do you think the problem will go away?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 28, 2016 Apr 28, 2016

You have a much better chance of it working – that’s for sure!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 29, 2016 Apr 29, 2016

With Acrobat 11.0, I am now getting a 523:523 error:

523_523_error.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 29, 2016 Apr 29, 2016
LATEST

Try disabling protected mode.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines