WebBrowser in form not displaying PDF output in Win 7

gchq

Well-known member
Joined
Dec 14, 2007
Messages
168
Programming Experience
10+
Hi there

Just moved a .NET 2.0 App from VS2005 to VS2010 and noticed that now when a window containing a WebBrowser tries to retrieve a pdf it thows out an error (unknown file type System.Byte[]). This would usually indicate that Acrobat Reader has not been installed - but open up IE9 and enter the link into the address bar and the PDF displays in the browser without any incident!

Should point out that the app created in VS2005 and installed on Win 7 (actually Server 2008 R2 in 'Workstation Mode') has the same issue..

All works fine in XP and below... Do seem to remember this on a Vista box, but put that down to Acrobat not being installed!

Any ideas?

Thanks
 
Update

It seems that the issue is related to x64 - after finally getting the app to run in x86 mode it worked (sort of). Adobe have other issues with Win 7

Adobe Forums: "Cannot use adobe reader to view pdf in...

Perhaps when the next version hits the streets it might cure a few ills!

Is there any way to get this running in Any CPU mode or am I going to be stuck shipping a 32 bit product in a new brave 64 bit world?
 
Adobe Reader is 32-bit. If you want to use a component of Adobe Reader in your app then your app has to be 32-bit also. This is the same reason that 64-bit IE can't display Flash or Silverlight. Presumably 64-bit IE can't display PDFs either. If you want want to create a 64-bit app then you'll have to require your users to have a 64-bit PDF reader installed.
 
Adobe Reader is 32-bit. If you want to use a component of Adobe Reader in your app then your app has to be 32-bit also. This is the same reason that 64-bit IE can't display Flash or Silverlight. Presumably 64-bit IE can't display PDFs either. If you want want to create a 64-bit app then you'll have to require your users to have a 64-bit PDF reader installed.

Interestingly Flash now have a 64bit version released in beta and somehow or other Silverlight quite happily installed and runs in IE9 64 Bit. I'm hoping that Adobe Reader X when it comes out in a few weeks will support x64


The thing that confuses me with the PDF issue is that it loaded quite happily into the 64 bit browser, but not within the app!
 
Back
Top