title: How To Programmatically Enable/Disable 'Display PDF In Browser' For Acrobat / Reader XI or DC For Use With Adobe ActiveX Control
body: <p>We have a .NET C# application that makes use of the Adobe ActiveX Controls. For versions 7-10 of both Adobe Acrobat and Adobe Reader, to use this control you were required to turn on the "Display PDF In Browser" setting. You could do this manually from the GUI using </p>
  
  <pre><code>Preferences &gt; Internet &gt; Display PDFs in browser
  </code></pre>
  
  <p>or programmatically by setting the registry settings directly </p>
  
  <pre><code>HKEY_CURRENT_USER\Software\Adobe\(Product Name)\(Version)\Originals
  "bBrowserIntegration"=dword:00000001
  </code></pre>
  
  <p>Which follows the SDK reference <a href="http://www.adobe.com/devnet-docs/acrobatetk/tools/PrefRef/Windows/Originals.html#BrowserIntegration" rel="nofollow noreferrer">http://www.adobe.com/devnet-docs/acrobatetk/tools/PrefRef/Windows/Originals.html#BrowserIntegration</a>. Our application has been using the programmatically setting of this registry value when our customers have versions 7-10 of Adobe Reader or Adobe Acrobat. The link above also indicates that this <code>bBrowserIntegration</code> registry key is deprecated in XI (11). The old registry path still exists in the new versions, i.e.:</p>
  
  <pre><code>HKEY_CURRENT_USER\Software\Adobe\(Product Name)\(Version)\Originals
  </code></pre>
  
  <p>however there is no longer a <code>bBrowserIntegration</code> key just as the documentation indicates, it is deprecated.</p>
  
  <p>It does appear that the Adobe ActiveX Control still works just fine with XI and DC as long as Display PDF in Browser is enabled, as it always has.</p>
  
  <p>For versions XI (11) and DC, there are two published links that clearly show how to achieve this <strong>manually</strong>:</p>
  
  <pre><code>XI (11): https://helpx.adobe.com/acrobat/11/using/display-pdf-browser-acrobat-xi.html
  DC (current): https://helpx.adobe.com/acrobat/using/display-pdf-in-browser.html
  </code></pre>
  
  <p>When testing Adobe Reader DC, if we don't complete the steps to enable the Display PDF in Browser for a new customer installation, then our application will throw a <code>COM error</code> and then if we enable the setting following the instructions in the link above, everything works as expected with our application, it renders PDFs using the Adobe ActiveX Control, which is similar to what we expect to see in older versions (7-10) when the registry setting was not set (see my old post and my own solution back then <a href="https://stackoverflow.com/questions/2526301/how-to-diagnose-cause-fix-or-work-around-adobe-activex-com-related-error-0x8/2561962#2561962">How to diagnose cause, fix, or work around Adobe ActiveX / COM related error 0x80004005 progmatically?</a>).</p>
  
  <p>So, the question remains, what is the expected programmatic equivalent either for the manual process in XI or DC today or the equivalent to what worked in 7-10 by setting the registry setting <code>bBrowserIntegration</code> accordingly. We want to be able to turn it on and then reset it to the previous setting when our application ends (so our application doesn't force the user to keep the setting just because our application needs it) which is what we do today for 7-10.</p>
  
  <p>I can't seem to find any references online for how to enable/disable browser integration from a developer standpoint so our application can continue to the use the ActiveX Control and not have the COM errors show up, forcing the user to change this manually.</p>
  
  <p>The primary priority is to understand the solution for <strong>DC</strong> as this represents the new paradigm for Adobe Acrobat/Reader.</p>