Пример #1
0
 void browser_DocumentCompleted(object sender, System.Windows.Forms.WebBrowserDocumentCompletedEventArgs e)
 {
     if (browser.Url == e.Url)
     {
         Console.WriteLine("Navigated to {0}", e.Url);
     }
     browser.Show();
 }
Пример #2
0
    public void show_html(System.Object sender, System.EventArgs e)
    {
        System.Console.WriteLine("ShowHtml() called");
        var buffer = this.page.new_buffer_from_page_with_format(
            "docx",
            "html",
            new mupdf.Matrix(1, 0, 0, 1, 0, 0),
            new mupdf.Cookie()
            );
        var html_bytes  = mupdf.Buffer_extract.fn(buffer);
        var html_string = System.Text.Encoding.UTF8.GetString(html_bytes, 0, html_bytes.Length);
        var web_browser = new System.Windows.Forms.WebBrowser();

        web_browser.DocumentText = html_string;
        web_browser.Show();
    }