x64下WinForms webbrowser控件中显示pdf

Displaying pdf in WinForms webbrowser control under x64(x64下WinForms webbrowser控件中显示pdf)

本文介绍了x64下WinForms webbrowser控件中显示pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,它使用 Microsoft 提供的 webBrowser 控件向用户显示 pdf.已经发现,当应用程序在 x64 下运行时,pdf 将下载并在 Adob​​e 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.

另请参阅:http://blogs.msdn.com/b/ieinternals/archive/2010/01/13/web-browser-control-does-not-show-flash-or-silverlight-in-a-64bit-dot-net-application.aspx

这篇关于x64下WinForms webbrowser控件中显示pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:x64下WinForms webbrowser控件中显示pdf

基础教程推荐