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


- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01