Comment faire pour afficher le PDF dans le navigateur web de contrôle au lieu d'ouvrir Acrobat Reader

je suis à l'aide d'Acrobat Reader version 11.0.3 et windows 7, Visual studio 2012 et déjà permis d'Acrobat Reader Gérer Addon

et suivez WPF webbrowser ouvre le fichier PDF dans Adobe reader fenêtre

toujours des erreurs après avoir essayé deux méthodes

De Navigation vers la page web annulée
même si l'aide de l'administrateur de compte pour ouvrir WPF programme

private void CheckAndFixWebBrowserRenderingEngine()
        {
            RegistryKey baseRegistryKey = Registry.LocalMachine;
            string renderingEngineSubKeyString = @"SOFTWARE";

            //64bit operationg systems have another registry path
            if (Environment.Is64BitOperatingSystem)
            {
                renderingEngineSubKeyString += @"\Wow6432Node";
            }

            renderingEngineSubKeyString += @"\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION";

            //var assemblyValueKey = System.IO.Path.GetFileName(App.ResourceAssembly.Location);
            var assemblyValueKey = System.IO.Path.GetFileName(System.Windows.Application.ResourceAssembly.Location);

            var renderingEngingeValue = 9999; //check other values below

            try
            {
                RegistryKey sk1 = baseRegistryKey.CreateSubKey(renderingEngineSubKeyString);

                var value = sk1.GetValue(assemblyValueKey);
                if (value == null || value.ToString() != renderingEngingeValue.ToString())
                {
                    sk1.SetValue(assemblyValueKey, renderingEngingeValue);

                    //LogHandler.Instance.Add(string.Format("Did update webbrowser rendering engine from {0} to 9000.", value == null ? "[missing]" : value));
                }
            }
            catch (Exception ex)
            {
                //LogHandler.Instance.Add("Could not check webbrowser rendering engine in registry.");
                //LogHandler.Instance.Add(ex.ToString(), Logging.LoggingPriorities.Exception);
            }

            /*
            9999 (0x270F) 
            Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

            9000 (0x2328) 
            Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

            8888 (0x22B8) 
            Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

            8000 (0x1F40) 
            Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.

            7000 (0x1B58) 
            Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.
            */
        }

        public ReportForm()
        {
            this.formID = "Test Report";
            //base.Initialization();
            InitializeComponent();
            CheckAndFixWebBrowserRenderingEngine();

            String PDFPath = @"C:\Users\LAB-User2\Downloads\Elimination_Methods_in_Polynomial_Computer_Alge(Bookos.org).pdf";
            WebBro1.Navigate("file:///" + PDFPath);

Méthode 2

j'ai aussi essayé une autre méthode qui ajouter une référence windowformintegration et l'utilisation UserControl de winform et il ne le travail en indépendant WPF petit projet
lors de l'intégrer dans mon projet d'envergure, il a obtenu l'erreur ci-dessus

String PDFPath = @"C:\Users\LAB-User2\Downloads\Elimination_Methods_in_Polynomial_Computer_Alge(Bookos.org).pdf";
            //WebBro1.Navigate("file:///" + PDFPath);
            webBrowser1.Navigate("file:///" + PDFPath);

private System.Windows.Forms.WebBrowser webBrowser1;
<WindowsFormsHost Margin="1" x:Name="windowsFormsHost1" Height="600" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="1000"/>

var uc = new UserControl1();
            this.windowsFormsHost1.Child = uc;


application.UI.CreateNewForm("Test Report", new Client.Reporting.Pages2.ClientStatement.ReportForm());

public partial class ReportForm : BaseForm

public void CreateNewForm(string title, BaseForm form)
    mw.CreateNewForm(title, form);


public class BaseMainWindow : MetroWindow
    {
        public virtual void CreateNewForm(string title, BaseForm form)
        {

        }

mise à jour: il demander pour permettre de bloquer le contenu et l'écran gris dans internet explorer dans le fichier html avant de les intégrer dans un projet important,

<html>
<body>

<object
  classid="clsid:ca8a9780-280d-11cf-a24d-444553540000" id="pdf1" 
  type="application/pdf"
  data="C:\Users\LAB-User2\Downloads\Elimination_Methods_in_Polynomial_Computer_Alge(Bookos.org).pdf"
  style="width: 100%; height: 100%">

<param name="src" "value="C:\Users\LAB-User2\Downloads\Elimination_Methods_in_Polynomial_Computer_Alge(Bookos.org).pdf"></param>

</object>

</body>
</html>

Comment faire pour afficher le PDF dans le navigateur web de contrôle au lieu d'ouvrir Acrobat Reader

mise à jour: lorsque vous exécutez votre code dans grand projet WPF, c'est montrer de la croix-rouge
Comment faire pour afficher le PDF dans le navigateur web de contrôle au lieu d'ouvrir Acrobat Reader

mise à jour : après mise à jour de html, il travaille en indépendant fichier html, cependant intégrée dans WPF gros projet, il a échoué à montrer et de ne montrer de la croix-rouge

String temphtml = "<!-- saved from url=(0016)http://localhost --><body style=\"border: 0; margin: 0; padding: 0\"><object classid=\"clsid:ca8a9780-280d-11cf-a24d-444553540000\" id=\"pdf1\"  type=\"application/pdf\" data=\"02_LAB_LeaveApplication.pdf\" style=\"width: 100%; height: 100%; border: 0; margin: 0; padding: 0\"></object><script>window.onload = function(){ window.focus();pdf1.setActive(); }</script></body>";
            System.IO.File.WriteAllText(@"C:\Users\LAB-User2\Desktop\vpfs-ivpfs-client\iVPFS_Client\Application\bin\Debug\a.html", temphtml);            
            this.WebBro1.Navigate(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "a.html"));

mise à jour bien que l'exécution du projet téléchargé à partir de la codeproject, ça affiche une erreur et peut montrer pdf et avoir un peu de temps vide quand il est ouvert, puis je copie les codes et bibliothèque pour un petit projet WPF et de l'exécution, il ont aussi erreur de sortir et de ne montrer blanche https://docs.google.com/file/d/0Bxs_ao6uuBDUeV8yREVBOExSbW8/edit?usp=sharing

avez-vous découvert alors qu'il ne travaille pas dans votre grand Projet? J'ai exactement le même Problème. J'ai une (noir) de la croix dans mon Projet réel, mais dans un Prototyp de l'application, il fonctionne très bien.

OriginalL'auteur ControlPoly | 2013-08-05