Click here to Skip to main content
15,885,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a VB.net app that displays PDF files in a web browser control. The app runs fine on my WinXP development box, 2 WinXP embedded test boxes and a Win2000 test box. I recently tried it on another Win 2000 box and I am getting a “The Page Cannot be Displayed” errors in the web browser control after navigating to a page. When I scroll down to bottom of the error it says “Cannot find server or DNS error”. If I open an IE browser and paste a path of the PDF file in the address bar, the PDF is displayed properly. Why can’t I see a PDF in my Web browser control when it works properly in IE? The only real differences I can see between the 2 Win 2000 test boxes is that the one that works has Adobe 8.1.1 and the one that doesn't work has Adobe 8.1.2.

Here is a copy of the code I'm using to display the PDF:

VB
Dim sFilePath As String = "c:\temp\testpdf.pdf"
WebBrowserWebContent.Navigate(sFilePath & "#toolbar=0&navpanes=0")
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900