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

AcroPDF throwing exception when used in x64 Application

New Here ,
Apr 27, 2017 Apr 27, 2017

Hi,

I am facing few issues in rendering PDF document in the 64-bit environment. The same source code is working fine in the 32-bit environment.

Application Build Plat Form Target: x64

In the project, the below DLL's were referenced

1. AxInterop.AcroPDFLib

2. Interop.AcroPDFLib

            this.axAcroPDF1 = new AxAcroPDFLib.AxAcroPDF();

            ((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).BeginInit();

            this.axAcroPDF1.Dock = System.Windows.Forms.DockStyle.Fill;

            this.axAcroPDF1.Enabled = true;

            this.axAcroPDF1.Location = new System.Drawing.Point(0, 0);

            this.axAcroPDF1.Name = "axAcroPDF1";

            this.axAcroPDF1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAcroPDF1.OcxState")));

            this.axAcroPDF1.Size = new System.Drawing.Size(800, 0);

            this.axAcroPDF1.TabIndex = 16;

            ((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit();

While executing the above code exception is thrown at the line

((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit();

Exception Message:

          A first chance exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll

          Additional information: Could not load file or assembly 'Interop.AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.           An attempt was made to load a program with an incorrect format.

Is there any solution to overcome this issue?

Thanks in advance

Parthiban Kumaravel

TOPICS
Acrobat SDK and JavaScript
1.9K
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, 2017 Apr 29, 2017

Version?

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 ,
May 02, 2017 May 02, 2017
LATEST

Hi,

  The version information follows,

Installed Software: Adobe Acrobat Reader DC

Version: 17.009.20044

AcroPDF.dll Version Info

AcroPDF.png

Thanks in advance

Parthiban Kumaravel

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