1

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);

    }

And here's my problem:

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?

I'm working with a Windows 7 Professional 32 bit.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Paolo Zaia
  • 218
  • 3
  • 14

3 Answers3

2

This is a painful bug that I solved in the following way when all the other proposed solutions failed to work for me.

  1. Confirm that Adobe reader is properly configured to display content within the WebBrowser control. In Reader, Edit, Preferences, Security (Enhanced) and uncheck Enable Protected Mode at Startup.

  2. Confirm that Internet Explorer has enabled Reader. In IE, click the toolgear icon, choose Manage Add Ons, Click the drop down box on Show currently loaded Add ons to select All Add-ons. You should see Adobe Reader listed as Enabled.

3) You are now ready to solve this frustrating problem. REMOVE ADOBE ACROBAT READER DC FROM YOUR COMPUTER and then IMMEDIATELY RE-INSTALL IT.

  1. In ACROBAT READER DC, once again, Edit, Preferences, Security (Enhanced) and uncheck Enable Protected Mode at startup.
Dan
  • 99
  • 5
1

this is how I fixed this problem with AcrobatReader DC. I linked a little tutorial, I hope help you:

How I Fixed this problem , just an easy guide

luka
  • 605
  • 8
  • 15
  • I also had to shut down the Adobe update running in task mgr before it worked. – CW1255 Mar 04 '20 at 14:41
  • strange , because I had try with all acrobat reader version installed , and I haven't encountered problem with Adobe Update. thanks anyway for your suggestion. – luka Mar 04 '20 at 16:01
0

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.

Giangregorio
  • 1,482
  • 2
  • 11
  • 12