Copy link to clipboard
Copied
I am new to this and built a test app to search through a PDF usinv dotnet (C#)
the app builds correctly but when I run it I get the folloowing error
System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {7CD069A1-50AA-11D1-B8F0-00A0C9259304} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).'
The class in in the registery (I looked, windows 11) and the project references are all found in Visual Studio 2022 but the DLLs come from my licensed 2015 Acrobat Pro
using Acrobat;
using AFORMAUTLib;
---
IAFormApp formApp = new AFormAppClass();
Thanks for looking!
You need to download the Acrobat SDK and examine the C# examples. The SDK download includes pretty much everything in the desktop Acrobat programming world. The C++ API, the IAC (which is what you need), and JavaScript, as well as some misc bits.
https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/releasenotes.html
And also read the documentation:
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/interapp/index.html
Copy link to clipboard
Copied
You need to download the Acrobat SDK and examine the C# examples. The SDK download includes pretty much everything in the desktop Acrobat programming world. The C++ API, the IAC (which is what you need), and JavaScript, as well as some misc bits.
https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/releasenotes.html
And also read the documentation:
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/interapp/index.html
Copy link to clipboard
Copied
Thanks, found the problem.
The Interop.AFORMAUTLib.dll that was in my reference was a VB one instread of a C#
The sample program FillForm had the "IAFormApp formApp = new AFormAppClass();" and it ran correctly
I then went back to my original app and unaccountably it had a path to the VB file in the reference.
Copy link to clipboard
Copied
This is a follow up as my original explanation of the “fix” was incorrect.
The actual problem that caused the “class registration error” was because I had failed to open Acrobat Pro in my C# program. It was a coincidence that the link to the DLL was fixed the problem. I had opened Acrobat Pro just before I made that DLL path change and since Acrobat Pro was running in the background my C# code started worked.
Adding “CAcroApp acroApp = new AcroAppClass();” in the form class fixed the registration problem and it was no longer necessary to have acrobat running in background.