【问题标题】:Want exact file format on download which we had upload for signature on document sign想要下载我们已上传以在文件签名上签名的确切文件格式
【发布时间】:2018-12-19 01:53:05
【问题描述】:

我正在执行这些步骤。

  1. 我正在使用为 DocuSign 上传 TEXT / PNG / DOCX / PPTX 文件 c# API。
  2. 当我在文件签名后下载该文件时,我得到了该签名文件的 PDF 格式,上传的文件格式除外。

在签名完成后,我是否有任何替代的代码或 API 方式如何在下载时获得相同的扩展文件。

信封 ID:- 3a6b752a-92f1-4751-b06a-ffb2c236f65d , 93409bdc-edcf-4e4b-8c6f-3c76c6305dcf , 5a32979b-3739-4585-a554-b725e1d65504

我在 asp.net 中使用以下代码。

// get Lists the envelope documents.
public static EnvelopeDocumentsResult ListEnvelopeDocuments(string accountId, string envelopeId)
{
   EnvelopesApi envelopesApi = new EnvelopesApi();
   EnvelopeDocumentsResult docsList = envelopesApi.ListDocuments(accountId, 
   envelopeId);
   return docsList;
}
// download file using envelopeId and that I get .pdf format 

public static string DownloadSignedDocument(string envelopeId, string tempFileName, string companyCode, string apiUserName, string apiPassword, string integratorkey, string restApi)
{
  ApiClient apiClient = new ApiClient(restApi);
  Configuration.Default.ApiClient = apiClient;
// call the Login() API which sets the user's baseUrl and returns their accountId
string accountId = LoginApi(apiUserName, apiPassword, integratorkey);
// pass accountid and envelop id to get perticuler document for the download
  EnvelopeDocumentsResult documentList = ListEnvelopeDocuments(accountId, 
  envelopeId);

string SignedPDFPath = string.Empty;
EnvelopesApi envelopesApi = new EnvelopesApi();
foreach (EnvelopeDocument document in documentList.EnvelopeDocuments)
{
   MemoryStream docStream = 
   (MemoryStream)envelopesApi.GetDocument(accountId, 
    envelopeId, documentList.EnvelopeDocuments[0].DocumentId);
    string documentName = document.Name != "Summary" ? document.Name : 
    "Summary";
     SignedPDFPath = 
    systemConfiguration.ConfigurationManager.AppSettings["uploadFolder"] + 
    "/" + companyCode + "/" + "DocuSign/" + envelopeId;
     if (!Directory.Exists(SignedPDFPath))
      {
        Directory.CreateDirectory(SignedPDFPath);
      }
      string[] tempFileExtention = tempFileName.Split('.');
      string[] removeFileExtention = documentName.Split('.');
      // need to give hardcoded ".pdf" extention because **document.Name** 
      //gives pdf file formate
      SignedPDFPath = SignedPDFPath + "/" + removeFileExtention[0] + ".pdf" 
      ;

    // Server.MapPath("~/Uploadfiles/" + recipient.EnvelopeID + "/" + 
 //  recipient.EnvelopeID + "_" + documentName + ".pdf");
     using (FileStream fileStream = File.Create(SignedPDFPath))
      {
       docStream.Seek(0, SeekOrigin.Begin);
       docStream.CopyTo(fileStream);
      }
     break;
    }
     return SignedPDFPath;
    }

【问题讨论】:

    标签: asp.net-mvc angular asp.net-web-api docusignapi docusigncompositetmplts


    【解决方案1】:

    没有。

    所有文件在上传到 DocuSign 后都会转换为 PDF。如果需要,您可以使用外部工具将该 PDF 转换为另一种文件格式,但您会破坏文档上的“防篡改”数字印章。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-02
      • 1970-01-01
      • 2015-05-01
      • 2015-08-26
      • 1970-01-01
      • 2021-11-17
      相关资源
      最近更新 更多