Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 561
fin Avatar asked Feb 10 '12 12:02

fin


1 Answers

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.

like image 111
Zenexer Avatar answered Oct 25 '22 04:10

Zenexer