1

I'm creating an application that will heavily use PDF file viewing. Is there a difference/advantage in using WindowsFormsHost over WebBrowser? WebBrowser is just a line of code versus WindowsFormsHost setup. So, I'm curious if there are any advantages of using WindowsFormsHost?

B.K.
  • 9,982
  • 10
  • 73
  • 105

1 Answers1

1

WPF WebBrowser control runs in IE protected mode by default, and Adobe PDF Reader plugin is known to have issues with that. Check this question. I'd go with WindowsFormsHost and host PDF Reader ActiveX directly, here's how.

Community
  • 1
  • 1
noseratio
  • 59,932
  • 34
  • 208
  • 486
  • Is there a way do disable the protected mode to eliminate any potential issues with the plugin? Could it cause any additional problems? – B.K. Sep 06 '13 at 00:19
  • You could try disabling the protected mode with WebBrowser [Feature Control](http://stackoverflow.com/questions/18333459/c-sharp-webbrowser-ajax-call/18333982#18333982) (I haven't tried that). If you decided to go with hosting PDF Reader ActiveX directly, [this](http://stackoverflow.com/a/18306632/2674222) might be useful. – noseratio Sep 06 '13 at 00:29
  • 1
    Thank you, I will try messing with the Feature Control to see if I can get it to work. – B.K. Sep 06 '13 at 04:59
  • No problem, let us know if you find a combination of features that works reliably. – noseratio Sep 06 '13 at 05:06