I am trying to use the LoadFromStream method to view a PDF from a website url.
I get the stream object using the following code and then call the LoadFromstream method. I don't get any errors but i don't see the PDF either. The PDF does exist and i can view it in IE.
Any suggestions?
Uri myUri = new Uri("http://localhost/a.pdf");
WebRequest myWebRequest = WebRequest.Create(myUri);
WebResponse myWebResponse = myWebRequest.GetResponse();
Stream s = myWebResponse.GetResponseStream();
pdfViewer1.LoadFromStream(myWebResponse.GetResponseStream());