For a 32 bit wpf app if I want to show a pdf I usually use the following code:
WebBrowser browser = new WebBrowser();
browser.Navigate(new Uri(filename));
grid1.Children.Add(browser);
And the adobe reader takes over and my pdf is show on screen. The problem is I want to compile my application as AnyCPU so it will run in 64 bit mode on an x64 system. So, on a 64 bit system the above code makes a 64 bit browser and the adobe reader plugin does not work in that, so the user gets a file download box.
Does anyone know of a way to show a pdf in a 64 bit wpf application? I am open to 3rd party libraries, free or not. Or is there a way to make the WebBrowser run开发者_如何学编程 in 32 bit mode?
Thanks,
You might check out the various SDK tools from Foxit. I can't say I've used their SDK tools before, but I've long used their PDF reader as an alternative to Adobe Reader.
精彩评论