In a C# application I would like to open a url and download a pdf.
When this url is hit from the browser the page quickly loads and begins what I believe are ajax calls. After several seconds the browser download prompt appears with the pdf file.
I have attempted to open this url via WebClient. The stream I return is not the pdf file and is is the actual html of the page.
How can I detect the the pdf file has loaded and download it?