我正在使用Acrobat Reader 11.0.3和Windows 7,Visual Studio 2012窗口,并且已经在Manage Addon

中启用了Acrobat Reader

并按照WPF网络浏览器在Adobe Reader窗口中打开PDF文件

尝试两种方法后仍然有错误

该网页的导航已被取消
即使使用管理员帐户打开WPF程序

方法2

我还尝试了另一种添加参考windowformintegration并使用winform的UserControl的方法,该方法仅在独立的WPF小项目中有效
将其集成到我的大项目中时,出现了以上错误

更新:在集成到大项目中之前,它要求在html文件中允许Internet Explorer中的块内容和灰屏

enter

1
2
3
String temphtml ="<!-- saved from url=(0016)http://localhost --><body style="border: 0; margin: 0; padding: 0"><object classid="clsid:ca8a9780-280d-11cf-a24d-444553540000" id="pdf1"  type="application/pdf" data="02_LAB_LeaveApplication.pdf" style="width: 100%; height: 100%; border: 0; margin: 0; padding: 0"></object>window.onload = function(){ window.focus();pdf1.setActive(); }</body>";
            System.IO.File.WriteAllText(@"C:\\Users\\LAB-User2\\Desktop\\vpfs-ivpfs-client\\iVPFS_Client\\Application\\bin\\Debug\\a.html", temphtml);            
            this.WebBro1.Navigate(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"a.html"));