0

I am having trouble starting a Windows Forms application. My application uses the AcroPDFLib component to view a PDF in a Windows form. When I start the application, I get the error indicated above. Looking at the StackTrace, I find muptiple calls to AxHost, so I'm pretty sure this has to do with the AcroPDF ActiveX component. I have Adobe Reader 11.

Here is what I have tried:

  • Enabling the Adobe PDF Reader add-in in IE.
  • Checking the "Display PDF in Browser" setting in the Edit -> Accessibility -> Setup Assistant.
  • Reinstalling the WinForms app.
  • Restarting my computer.
  • I can open other PDFs on the internet.

Here is the Stack Trace:

System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
   at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstance()
   at System.Windows.Forms.AxHost.GetOcxCreate()
   at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   at System.Windows.Forms.AxHost.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
4

1 回答 1

0

您可能在 IE 中启用了有问题的加载项。

请在 IE中转到您的加载项并禁用Adobe Acrobat Sharepoint OpenDocuments Control加载项。现在检查您的应用程序是否正确启动。此插件似乎与 Adob​​e PDF Reader 插件冲突。

此插件用于提示用户打开或保存在 Sharepoint 中单击的 PDF 文档。如果加载项被禁用,PDF 将直接显示在 IE 中。

于 2014-09-11T20:20:00.617 回答