WebBrowser控件不会在Adobe中将Pdf文件显示到winform中.为什么? [英] WebBrowser control doesn't display the Pdf file into the winform with Adobe. Why?
问题描述
这是我的代码,用于将pdf文件打开到webBrowser控件中:
Here's my code to open the pdf file into the webBrowser control:
private void Form1_Load(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "pdf files (*.pdf) |*.pdf;";
dlg.ShowDialog();
webBrowser1.Navigate(dlg.FileName);
}
这是我的问题:
当我将Foxit Panthom用作默认pdf阅读器时,该pdf会显示在webBrowser中,但是当我将Adobe Reader(甚至尝试使用Sumatra Pdf尝试)设置为默认pdf阅读器时,该pdf文件会显示在一个单独的窗口中.为什么?我哪里错了?
When I have Foxit Panthom like default pdf reader the pdf is displayed into the webBrowser, but when I set Adobe Reader (I try even with Sumatra Pdf) to default pdf reader the pdf file is displayed into a separated window. Why? Where I'm wrong?
我正在使用32位Windows 7专业版.
I'm working with a Windows 7 Professional 32 bit.
推荐答案
在升级到Adobe Acrobat Reader DC后,它也停止为我们工作. 遵循此页面中的说明(意大利语;-) https ://helpx.adobe.com/it/acrobat/using/display-pdf-in-browser.html )对我们来说现在可以了.
It stopped working for us too after upgrading to Adobe Acrobat Reader DC. Following the instruction in this page (in italian ;-) https://helpx.adobe.com/it/acrobat/using/display-pdf-in-browser.html ) now is ok for us.
关闭电源,然后再次打开.
Switch off and then on again.
这篇关于WebBrowser控件不会在Adobe中将Pdf文件显示到winform中.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!