将Adobe PDF Reader COM-Control添加到WinForm失败

时间:2011-10-18 09:33:19

标签: pdf axhost

我尝试添加COM控件。我采取的步骤:
 1.右键单击工具箱
 2.选择COMComponents选项卡,然后选择“Adobe PDF Reader”
 3.单击“确定”按钮
 4.现在尝试将Adobe PDF Reader Control拖放到UserControl中 - >失败并出现错误:

"Failed to create component 'AxHost'. The error message follows: 'System.Runtime.InteropServices.COMException (0x80004005): A wrapper assembly is not registrated for this type library. at System.Windows.Forms.Desgn.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host) at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues) 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 heigth, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgse)'"

我现在能做什么?

感谢您提前回复每一个问题。

问候,乔

2 个答案:

答案 0 :(得分:0)

尝试以下方法 打开Acrobat Reader |编辑|偏好|互联网 选中“在浏览器中显示PDF”框

您还必须使用32位设置(x86)进行调试

答案 1 :(得分:0)

按照Internet Explorer中的以下步骤为浏览器启用pdf:https://helpx.adobe.com/acrobat/using/display-pdf-in-browser.html

答案与Ahmads相同,但在较新版本中,这样做的方法不同。