Saving PDF on local hard disk which is read by browser control
-
Hi, I am writing program VB.Net (using Visual studio 2005). In this program, I am using browser control to send request on the internet. In responce to the request, one PDF file gets opened in the browser automatically. I want to save this PDF file on the hard disk. To do this, I think my program should be able to read the downloaded file in response to my request. Is there any way by which I can do this. Thanks in advance. Regards, Sunil
-
Hi, I am writing program VB.Net (using Visual studio 2005). In this program, I am using browser control to send request on the internet. In responce to the request, one PDF file gets opened in the browser automatically. I want to save this PDF file on the hard disk. To do this, I think my program should be able to read the downloaded file in response to my request. Is there any way by which I can do this. Thanks in advance. Regards, Sunil
-
If you just want to download the PDF file use HttpWebRequest. Google it and you'll find some example code.
I am afraid I can not use it. Becuase I don't have to use only the URL. Following is the flow of my program. 1) My application open a web page in WebBrowser control after sending some URL , say www.xx.com (using Navigate method) 2) The opened web page(www.xx.com) has fields like Name, Address, SSN. My application fills this information in the browser window programatically and clicks on one link in the same web page (this is also programatically) 3) on clicking the link, the filled infomration gets submitted and at the server end(of www.xx.com) it processes entered name, address and SSN and generates one PDF file. This PDF file gets opened in my browser(webbrowser) window. 4) This opened PDF, I want to save on the hard disk programatically without having to click manually on the save icon of the embedded acrobat reader. I am unable to achieve step 4.