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

Acrobat SDK .NET sample problem (Could not load file or assembly)

New Here ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

Hi,

I am unable to run any sample from:

"sdkDC_v1_win\Adobe\Acrobat DC SDK\Version 1\InterAppCommunicationSupport"

I already installed Acrobat DC Pro (7 days trial) today.

Version:

Continous Release | Version 2019.010.20098Version File Version: 19.010.20098.54430

AGM Version 4.030.00084

CoolType Version 5.014.00038

Core Version 19.2560

JP2K Version 1.002.00002.42832

All references,including Acrobat, are fine (they are not showing with yellow warning)

The error occured when I try to run every sample is:

System.BadImageFormatException

  HResult=0x8013101B

  Message=Could not load file or assembly 'Interop.Acrobat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

  Source=<Cannot evaluate the exception source>

  StackTrace:

<Cannot evaluate the exception stack trace>

I've already tried to add the reference again from

C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\acrobat.tlb

but no success

Please help, is very important.

TOPICS
Acrobat SDK and JavaScript

Views

1.5K

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
LEGEND ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

With what software and version are you trying to run the examples?

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
New Here ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

I already installed Acrobat DC Pro (7 days trial) today.

Version:

Continous Release | Version 2019.010.20098Version File Version: 19.010.20098.54430

AGM Version 4.030.00084

CoolType Version 5.014.00038

Core Version 19.2560

JP2K Version 1.002.00002.42832

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
LEGEND ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

I mean, what development environment, scripting language or whatever. The examples might be in C, for example, and you might be opening In Visual C++ 6.0. Please tell us which example exactly, and what you are doing. Are you experienced in the programming language used in the example?

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
New Here ,
Nov 13, 2020 Nov 13, 2020

Copy link to clipboard

Copied

I just tried this same thing and got the same error. I am using Microsoft Visual Studio Community 2019
Version 16.8.0, and trying to tun the IAC/win/VBSamples/FormsAutomationVB sample app. This is the Reference value  for System.dll C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll.

 

The app launches fine, but fails on execution when pressing the CREATE FIELDS button.

 

 

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 Expert ,
Nov 13, 2020 Nov 13, 2020

Copy link to clipboard

Copied

I would suggest starting small, just write a small program that creates an AVApp object and gets the current AVDoc. The first thing you need to do is make sure the correct TLB file is loaded. Then you'll be able to correctly create these object. Everything else is easier form there. 

 

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
New Here ,
Nov 15, 2020 Nov 15, 2020

Copy link to clipboard

Copied

LATEST

So it seems that my VB is quite rusty. 🙂 The issue here turned out to be that the target .NET version was set to 2.0. I changed it to 4 and everything worked fine. These samples are very helpful, thanks to the contributors!

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