开发者

Downloading PDF using Google Data API SDK for .NET v1.8

开发者 https://www.devze.com 2023-03-05 14:21 出处:网络
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'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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号