Hi Richard,
Please change the following 2 lines in the code :
WebRequest myWebRequest2 = WebRequest.Create(InfoStoreURI);
myWebRequest2.ContentType ="application/pdf";
to the below lines:
HttpWebRequest myWebRequest2 = (HttpWebRequest)WebRequest.Create(InfoStoreURI);
myWebRequest2.Accept = "application/pdf";
Regards,
Swati