Unable to cast COM object of type 'System.__ComObject' to interface type 'Acrobat.AcroAVDoc'

0

I'm unable to load a PDF in WinForms.

Here are the DLLs I'm referencing:

  • AxInterop.AcroPDFLib.dll
  • Interop.Acrobat.dll
  • Interop.AcroPDFLib.dll

Here's my code:

Acrobat.AcroAVDoc oAvDoc2 = null;

oAvDoc2 = (Acrobat.AcroAVDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.AVDoc"));

I'm receiving the following error:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Acrobat.AcroAVDoc'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9B4CD3E8-4981-101B-9CA8-9240CE2738AE}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)). | System.InvalidCastException

c#
.net
com-interop
acrobat
asked on Stack Overflow Jul 31, 2018 by Kiran R L • edited Aug 18, 2018 by Camilo Terevinto

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0