Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. viewing pdf using browser object in c#

viewing pdf using browser object in c#

Scheduled Pinned Locked Moved C#
csharphelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    crzyank
    wrote on last edited by
    #1

    I am using a browser object to view PDFs in my c# code: { wbBrowsePDF.Navigating += new WebBrowserNavigatingEventHandler(wbBrowsePDF_Navigating); wbBrowsePDF.Visible = true; wbBrowsePDF.Navigate(strFileName); } private void wbBrowsePDF_Navigating(object sender, WebBrowserNavigatingEventArgs e) { System.Windows.Forms.HtmlDocument document = this.wbBrowsePDF.Document; } it works just fine and then I use: { wbBrowsePDF.Stop(); wbBrowsePDF.Navigate("about:blank"); wbBrowsePDF.Dispose(); } to close the document. Problem is that the acrobat reader (AcroRd32.exe stays open and must be killed using Task Manager. Could anyone please suggest any solution? Thanks.

    B L 2 Replies Last reply
    0
    • C crzyank

      I am using a browser object to view PDFs in my c# code: { wbBrowsePDF.Navigating += new WebBrowserNavigatingEventHandler(wbBrowsePDF_Navigating); wbBrowsePDF.Visible = true; wbBrowsePDF.Navigate(strFileName); } private void wbBrowsePDF_Navigating(object sender, WebBrowserNavigatingEventArgs e) { System.Windows.Forms.HtmlDocument document = this.wbBrowsePDF.Document; } it works just fine and then I use: { wbBrowsePDF.Stop(); wbBrowsePDF.Navigate("about:blank"); wbBrowsePDF.Dispose(); } to close the document. Problem is that the acrobat reader (AcroRd32.exe stays open and must be killed using Task Manager. Could anyone please suggest any solution? Thanks.

      B Offline
      B Offline
      Big Daddy Farang
      wrote on last edited by
      #2

      What version of Acrobat Reader is installed? I vaguely remember a similar issue with version 7.something of it. (I said vaguely....) Unfortunately whatever details I have about it are at home. If you have version 8.whatever, then I don't know what the cause is, and therefore can't help fix it. :( I really hate to suggest getting the latest version from Adobe, because, well, it's Adobe. Hope somebody else has an answer for you.

      BDF A learned fool is more a fool than an ignorant fool. -- Moliere

      1 Reply Last reply
      0
      • C crzyank

        I am using a browser object to view PDFs in my c# code: { wbBrowsePDF.Navigating += new WebBrowserNavigatingEventHandler(wbBrowsePDF_Navigating); wbBrowsePDF.Visible = true; wbBrowsePDF.Navigate(strFileName); } private void wbBrowsePDF_Navigating(object sender, WebBrowserNavigatingEventArgs e) { System.Windows.Forms.HtmlDocument document = this.wbBrowsePDF.Document; } it works just fine and then I use: { wbBrowsePDF.Stop(); wbBrowsePDF.Navigate("about:blank"); wbBrowsePDF.Dispose(); } to close the document. Problem is that the acrobat reader (AcroRd32.exe stays open and must be killed using Task Manager. Could anyone please suggest any solution? Thanks.

        L Offline
        L Offline
        Luis Alonso Ramos
        wrote on last edited by
        #3

        Ok, it's not an answer to your question, but it's just so good I have to recommend it: get Foxit Reader[^] and forget about Ad...what was that name? :)

        Luis Alonso Ramos Intelectix Chihuahua, Mexico My Blog!

        B 1 Reply Last reply
        0
        • L Luis Alonso Ramos

          Ok, it's not an answer to your question, but it's just so good I have to recommend it: get Foxit Reader[^] and forget about Ad...what was that name? :)

          Luis Alonso Ramos Intelectix Chihuahua, Mexico My Blog!

          B Offline
          B Offline
          Big Daddy Farang
          wrote on last edited by
          #4

          Excellent suggestion, Luis. All the functionality without all the bloat.

          BDF A learned fool is more a fool than an ignorant fool. -- Moliere

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups