I am trying to access the binary data of PDFs in my C# .NET 2.0
project. I have a URL that points directly to the PDF, but I connot access the content through DocumentStream (which is null) . I can't use an HttpWebRequest to get the PDF from this URL, because the server that the PDF is hosted on requires script-based
authentication, which means I need to use a WebBrowser to do everything.
The authentication is no problem (I already have it logging in); I just need to have my already logged-in WebBrowser fetch these PDFs without any human interaction. How can I access the PDF and save it to my local disk?
This question is based on the following forum thread: http://bytes.com/topic/c-sharp/answers/505986-webbrowser-access-binary-content