在Docusign中创建信封/草稿信封时附加pdf /其他文件

问题描述

目标是在创建信封/草稿信封时附加pdf /其他文件。我正在使用PHP5 Docusign。

请在此随附“ create_proposal.PHP”作为“ create_proposal.txt”以供参考。

// instantiate a new envelope attachment
$content_bytes = file_get_contents("test.pdf");
$doc1_b64 = base64_encode($content_bytes);

$document1 = new \DocuSign\eSign\Model\Document([ # create the DocuSign document object
'document_base64' => $doc1_b64,'name' => 'Order ackNowledgement',# can be different from actual file name
'file_extension' => 'pdf',# many different document types are accepted
'document_id' => '1' # a label used to reference the doc
]);

$envelop_deFinition->setDocuments([$document1]);

响应为:

<pre>DocuSign\eSign\Client\ApiException Object
(
[responseBody:protected] => O:8:"stdClass":2:{s:9:"errorCode";s:33:"TAB_PAGENUMBER_IS_NOT_IN_DOCUMENT";s:7:"message";s:134:"The pagenumber specified in the tab element is not in the document that the tab refers to. Tab on Page 4 of Document 1 for Recipient 1";}
[responseHeaders:protected] => Array
(
[0] => HTTP/1.1 400 Bad Request
[Cache-Control] => no-cache
[Content-Length] => 196
[Content-Type] => application/json; charset=utf-8
[X-RateLimit-Reset] => 1604228400
[X-RateLimit-Remaining] => 992
[X-RateLimit-Limit] => 1000
[X-BurstLimit-Remaining] => 499
[X-BurstLimit-Limit] => 500
[X-DocuSign-Tracetoken] => 943befbf-c776-4d03-a091-be5202acede7
[X-DocuSign-Node] => DA4FE36
[Date] => Sun,01 Nov 2020 10:10:54 GMT
[vary] => Accept-Encoding
)

请提供解决方案。谢谢。

解决方法

Manish,看着该错误似乎与为用户分配标签有关。您是否可以提供更多代码,因为不清楚是否使用模板,如何设置选项卡等。您是否尝试过从here下载并运行PHP代码示例。您也可以从here下载快速入门

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...