0
votes

I'm using the webbrowser control to scrape my medical information from my Health Care provider, The website is secured using a username and password, I've managed to scrape everything I need except some pdf file.

After navigating to the page I get this javascript "Loading...", In a regular browser I'll see the PDF file rendered in the browser, but for the webbrowser control it doesn't display the pdf, I get the famous yellow notification bar.

The url for the pdf file is like this

"https://www.***.com/phoenix/views/akgCharts/zoomAkgChart.jsp?&date=20130502&time=123000", 

I'm using mshtml to do all the scraping, I don'tfind the file in the mshtml object, using fidller 2.0 I can see that the pdf file is downloaded to the computer (somewhere in the memory, I didn't find it in any folder)

Any idea??

1
In webbrowser there's no pdf-loader. So you need to check Acrobat or similar or use other webbrowser control. - Alker

1 Answers

0
votes

if you know the url what is sends you the file you can try something like this:

System.Net.WebClient _wclient = new System.Net.WebClient();
_wclient.DownloadFile("https://www.***.com/phoenix/views/akgCharts/zoomAkgChart.jsp?&date=20130502&time=123000",", @"c:\MedicalReport_" + DateTime.Now + ".pdf");