Displaying pdf in WinForms webbrowser control under x64(x64下WinForms webbrowser控件中显示pdf)
问题描述
我有一个应用程序,它使用 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.
另请参阅: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
基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
