Downloading PDF using Google Data API SDK for .NET v1.8
I'm trying to download PDF file from Google Docs using the .NET libraries. I'm able to download every oth开发者_开发技巧er file type but PDFs. Is downloading PDF supported using the .NET libraries?
I've tried the follow C# code:
Stream docStream = request.Download(doc, null);
and
Stream docStream = request.Dowload(doc, Document.DownloadType.pdf);
and
String docUrl = doc.DocumentEntry.Content.Src.ToString();
Uri docUri= new Uri(docUrl);
Stream docStream= request.Service.Query(docUri);
Each attempt returns "Execution of request failed" exception.
Today it started working as expected using the following line to download a pdf:
Stream docStream = request.Download(doc, null);
精彩评论