Copy link to clipboard
Copied
I am trying to use the AcroPDF.dll COM component to view pdf files from a .net application I am developing in Visual Basic under VS2010.
I have two very similar development computers, a development desktop and laptop, both running Visual Studio 2010 under Windows 7 SP1 with Adobe Reader 9.5 installed. On both systems, the COM
component AcroPDF.dll, Adobe Acrobat 7.0 Browser Control Type Library 1.0, is added to my project as a COM resource. The Laptop works fine with the AcroPDF.dll control in the VS2010 project, but the desktop is having all kinds of trouble. Specifically, all of the Windows Form classes which reference or inherit references from other classes referencing some COM component cannot be loaded in the designer. The types of errors I get include the following:
Failed to create component 'AxHost'. The error message follows: 'System.Runtime.InteropServices.COMException (0x80004005): A wrapper assembly is not registered for this type library. This error seems to point to the following statement which was created by the IDE in the deisgner: CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).BeginInit()
At other times, the designer will not open and the error message is: "Error HRESULT E_FAIL has been returned from a call to a COM component." I don't get much debugging information from this, but it seems to point to AcroPDF.dll.
Can anyone give me some direction in solving this? Thanks.
Copy link to clipboard
Copied
I don’t have anything specific about your problem, but I will point out that we don’t support VS2010 with Acrobat/Reader 9 – only VS2008.
Copy link to clipboard
Copied
Thankyou for the support status info, Irosenth. I wonder why it would work on one computer and not the other?
Copy link to clipboard
Copied
make sure it is not a problem with 64 bit compilation.
You need to compile explicitly as 32 bit on a 64-bit OS
Copy link to clipboard
Copied
I have a similar problem, but the strange thing with my executable compiled with x86 with VS 2010 SP1:
Can run on Windows XP, Windows Server x64, Windows 7 x64
but can NOT run on Windows 7 x86.
My Code Stop at the following Line of Code:
((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit()
COMException occurred
Error HRESULT E_FAIL has been returned from a call to a COM Component.
None of the following test help me find the problem:I have a project created in VS2008 on XP.
I then converted the Project into VS 2010 SP1 on Windows 7 x64 compile and it is running on the Windows 7 x86.
I don't know what have change, I only change the code in other form, not the form with Acrobat Viewer Control, recompile and it is nolonger work
on Windows 7 x86.
I then do a search and found this post and try the x86 Compilation (Instead of Any CPU) and it work on Windows 7/Server x64 and Windows XP but not Windows 7 x86.
I then went to the machine with Windows 7 x86 and install Visual Studio 2010, open up the project create a new form and add the Adobe PDF Reader
I get and Error in Visual Studio when adding the control to the form as follow:
Failed to create component 'AxHost'. The message follows:
'System.Runtime.InteropServices.COMException (0x80004005): A wrapper assembly is not registered for this type library.
at
System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)
at
System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)
at
System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgse)'
I have try remove Acrobat Reader and ReInstall.
Acrobat Reader v10.1.3
Does any one spot any error ?
Copy link to clipboard
Copied
Here is the Solution worked for me:
http://forums.adobe.com/message/1920206
Open Acrobat Reader | Edit | Preferences | Internet
Check the box Display PDF in browser