Хотите точный формат файла для загрузки, который мы загрузили для подписи на подписи документа

Я следую за этими шагами.

  1. Я загружаю файлы TEXT / PNG / DOCX / PPTX для DocuSign, используя C# API.
  2. когда я загружаю этот файл после подписи документа, я получаю формат PDF этого документа подписи за исключением формата загруженного файла.

Есть ли альтернативный способ кода или API, как я получил тот же файл расширения при загрузке после подписи.

Идентификатор конверта: - 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;
    }

1 ответ

Нет.

Все файлы преобразуются в PDF при загрузке в DocuSign. При желании вы могли бы использовать внешние инструменты для преобразования этого PDF в другой формат файла, но вы бы сломали "несанкционированный доступ" цифровую печать на документе.

Другие вопросы по тегам