DocuSignAPI.EnvelopePDF pdf = client.RequestPDF(id)

本文关键字:id RequestPDF client EnvelopePDF pdf DocuSignAPI | 更新日期: 2023-09-27 18:30:31

我已从 https://github.com/docusign/DocuSign-eSignature-SDK 下载了DocuSign-eSignature MS.Net 样本

代码运行正确,并从收件人处获取签名的文档。但是,当我们尝试通过单击GetStatusAndDocs部分下可用的下载按钮下载签名文档时,下面提到的代码会引发错误,

This demo has encountered an error: Timeouts are not supported on this stream.
Please correct the issue and try again.
 DocuSignAPI.EnvelopePDF pdf = client.RequestPDF(id) 

仅当文档是 pdf 文件时,才会遇到此错误。在文本文件的情况下工作正常。

DocuSignAPI.EnvelopePDF pdf = client.RequestPDF(id)

您是否更改了任何代码,或者是否正在运行开箱即用的确切 .NET 版本? 我猜你至少改变了一些代码,因为你说它适用于其他文件类型,但不适用于PDF。 我认为这是因为如果您查看 GetStatusAndDocs.aspx.cs 中第 122 行DownloadItem() 函数,您将看到:

Response.ContentType = "Application/pdf";

默认情况下,SDK 将文档内容类型设置为 PDF,因此如果您没有更改任何代码,那么我不确定它如何适用于.txt和其他文件类型?