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

Class not registered when running sample acrobat app

Community Beginner ,
Jul 21, 2023 Jul 21, 2023

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();

 

image.png

Thanks for looking!

 

TOPICS
Acrobat SDK and JavaScript , Windows

Views

766

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jul 21, 2023 Jul 21, 2023

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

 

 

Votes

Translate

Translate
Community Expert ,
Jul 21, 2023 Jul 21, 2023

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

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
Community Beginner ,
Jul 21, 2023 Jul 21, 2023

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.

Votes

Translate

Translate

Report

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
Community Beginner ,
Jul 24, 2023 Jul 24, 2023

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

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