AcroPDF观众控制问题 [英] AcroPDF viewer control problems

查看:600
本文介绍了AcroPDF观众控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在放弃的地步。

我要查看PDF文件在我的WinForms应用程序,所以我使用Adobe的ActiveX控件的尝试,和香草WebBrowser控件。 PDF文件是本地的,并且可以打开从资源管理器没有任何问题的。

I need to view pdfs in my Winforms application, so I've tried using Adobe's ActiveX control, and the vanilla WebBrowser control. The pdfs are local, and can be opened from Explorer with no problems at all.

奇怪的是,应用程序认为罚款在Visual Studio中运行时的PDF文件,但内置的应用程序只显示一个灰色地带,其中PDF格式应该是。同样的事情发生在双方的Adobe控制和WebBrowser控件。过了一会儿,我通常会得到一个Adobe错误说有与Acrobat / Reader的一个问题。如果它正在运行,请退出,然后重试。 (103:103)。我看着这个错误了,而劝我做的事情,没有工作(关闭安全设置)。

The weird thing is that the application views the pdfs fine when running in Visual Studio, but the built application simply shows a grey area where the pdf is supposed to be. The exact same thing happens with both the Adobe control and the WebBrowser control. After a while, I usually get an Adobe error saying There is a problem with Adobe Acrobat/Reader. If it is running, please exit and try again. (103:103). I've looked this error up, which advised me to do things that didn't work (turning off a security setting).

此外,如果WebBrowser控件是带一个 .Navigate(路径,真实),应用程序打开,显示PDF就好了一个IE窗口。

Moreover, if the WebBrowser control is called with a .Navigate(path, true), the application opens an IE window that displays the pdf just fine.

我试着以管理员身份运行,这都没有区别。我在束手无策,所以任何帮助将是很大的AP preciated。也许去一个第三方控制?

I've tried running as administrator, which makes no difference. I'm at wits' end, so any help would be greatly appreciated. Maybe going for a 3rd party control?

一些进一步的细节:我想两者的Adobe 11和Adobe DC,在Windows 10和8.1虚拟机,净4.6。只有Win7的虚拟机似乎很好地工作。

Some further detail: I tried both Adobe 11 and Adobe DC, on Windows 10 and 8.1 VMs, .Net 4.6. Only a Win7 VM seems to work fine.

推荐答案

我通过建立以86目标解决了这个。显然AcroPDF.dll不支持64位。当然,错误消息并非在所有有帮助的。

I solved this by building to x86 targets. Apparently AcroPDF.dll doesn't support x64. Of course, the error messages weren't at all helpful.

我的previous的答案是不正确的。真正的问题是Adobe的受保护的启动模式。这必须关闭,以直接使用观众没有问题的应用

My previous answer was incorrect. The real issue is Adobe's Protected Startup mode. This has to be turned off for the application to use the viewer directly without problems.

这篇关于AcroPDF观众控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆