Getting PDF_VALIDATION_FAILED exception when tryin

2019-07-25 09:35发布

I am trying to run the code available on GitHub.

Issue is when I am trying to create an envelope I am getting an exception saying "PDF_VALIDATION_FAILED".

Can anyone help me out with this issue?

标签: docusignapi
3条回答
闹够了就滚
2楼-- · 2019-07-25 10:14

Really you should be creating a new issue to log the new error you are getting, or modify your original post. In any case the issue is most likely due to the file extension, the default is pdf so if you want to send a different format document you can do the following:

// Add a document to the envelope
Document doc = new Document();
doc.DocumentBase64 = System.Convert.ToBase64String(fileBytes);
doc.Name = Path.GetFileName("/PATH/TO/DOC/TEST.DOCX");
doc.DocumentId = "1";
doc.FileExtension = "docx";
查看更多
甜甜的少女心
3楼-- · 2019-07-25 10:19

This is in response to the second error you mentioned:

I think you are missing assigning the FileExtension to the required format something like : doc.FileExtension = "docx"

Once you do that, you will get rid of UNABLE_TO_LOAD_DOCUMENT error and the document can be sent successfully.

查看更多
我命由我不由天
4楼-- · 2019-07-25 10:27

I managed to get a fix for this one. Apparently the file I was uploading was a corrupt file. However, not I am getting a different error 'UNABLE_TO_LOAD_DOCUMENT' when I try to upload a file in any format other than pdf.

Can anyone help me with this query? Also, what all file formats does DocuSign support?

Also, one of the previous libraries 'DocuSign.Integrations.Client' seem to work fine with word document uploads. Should they be used instead of 'DocuSign.eSign.Api', 'DocuSign.eSign.Client' and 'DocuSign.eSign.Model'?

查看更多
登录 后发表回答