How can I support in-browser display of a PDF file in Internet Explorer 64-bit

南楼画角 提交于 2019-12-07 02:21:55

问题


Adobe does not seem to support the display of PDFs in the browser when using the 64-bit version of Internet Explorer. Once a pdf link is clicked the 64-bit Internet Explorer will always span a new Adobe window to display the pdf. The 32-bit Internet Explorer will display the pdf embedded in the browser itself.

I noticed this issue when using the WebBrowser control in a 64-bit complied WinForms .NET application. I don't believe it's possible to use the 32-bit WebBrowser control in the 64-bit application so I am looking for some solutions to this problem even if it requires the use of a third party plug-in.

Any suggestions would be greatly appreciated.

Thanks.


回答1:


If you platform target needs to be x64, and your need to use an x64-incompatible feature, then clearly you have an issue. You're going to have to compromise on one side or the other.

Alternatively, you could look into opening a separate process for the PDF viewer and setting the parent window of the newly spawned process' window to your container control. This will have the effect of "embedding" the window within your control. You can then forcefully remove the border and maximize it. Windows API, to the rescue! Check out Sumatra PDF if you decide to go this route, which you can probably distribute without any trouble.



来源:https://stackoverflow.com/questions/9227720/how-can-i-support-in-browser-display-of-a-pdf-file-in-internet-explorer-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!