问题描述
我有一个应用程序,它使用 Microsoft 提供的 webBrowser 控件向用户显示 pdf.已经发现,当应用程序在 x64 下运行时,pdf 将下载并在 Adobe Reader 中打开,而不显示在用户控件中.(参考:http:///social.msdn.microsoft.com/Forums/en-US/winforms/thread/06ad960b-7c5e-459c-9261-ca9d0e4ac88f/) 除了在 x86 中编译应用程序之外,有没有人找到解决此问题的方法?
I have an application that uses the webBrowser control provided by Microsoft to display a pdf to the user. It has been found that when the application is running under x64 the pdf will download and open in Adobe Reader and not display in the user control. (Reference: http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/06ad960b-7c5e-459c-9261-ca9d0e4ac88f/) Has anyone found a workaround for this issue other than compiling the application in x86?
推荐答案
这在意料之中;32 位 PDF 阅读器文档对象仅由 32 位浏览器加载.当它不存在时,您将进入正常的文件下载代码路径.
That's to be expected; the 32bit PDF Reader Document Object is only loaded by the 32bit browser. When it's not there, you go down the normal file download codepath.
这篇关于在x64下的WinForms webbrowser控件中显示pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!