简体   繁体   中英

Adobe PDF Reader Plugin in TWEBBROWSER on new PC

according to PDF in TWEbbrowser I tried to run an selfprogrammed Delphi Prg which displays the PDF in a TWEBBROWSER component fine. But on 2 new PCs, where I just installed the Adobe DC PDF Reader I only see a gray window - no PDF anymore. How to fix this? I can see the PDF in IE. I Have Delphi Berlin. Thanks for help

The reason why PFD isn't correctly shown in TWebBrowser is the fact that by default TWebBrowser is opening web pages in Compatibility mode. This means that the web pages are opened in Interent Explorer 7 mode wihtout any extensions. And in order for you to be able to open PDF in Internet explorer it is done so in Acrobar Reader Web Extension.

In order to make TWebBrowser open web pages in compatibility mode for newest IE version you need to Opt in to the browser emulation feature using the documented registry key

NOTE: You need to opt in to the browser emulation on every computer where your program is used.
Or you could switch to the use of TEdgeBrowser instead as Robson Benedito suggested in his answer.

TWebBrowser component, when in Windows, navigates using the old Internet Explorer (not Microsoft Edge).

To ensure that it works you should open Microsoft Internet explorer and try to open this document in the machine that is showing the problem.

If it doesn't open you should fix it inside IE before open in you Delphi app. If it does, it could be an incompatibility with this Adobe plugin and the engine provided/used by TWebBrowser. In this case you can switch to TEdgeBrowser component that provides you the ability to have you own browser (with Chromnium) even if the Microsoft Edge is not installed ( http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component ).

With TEdgeBrowser you can open PDF directly without using plugin (even those installed in Windows).

Using TWebBrowser can also lead you to others problems with others PCs depending on the Internet Explorer (like proxy/javascript/plugins/etc).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM