viewing pdf using browser object in c#
-
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.
-
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.
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
-
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.
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!
-
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!
Excellent suggestion, Luis. All the functionality without all the bloat.
BDF A learned fool is more a fool than an ignorant fool. -- Moliere