几个可编辑的PDF [英] Several editable PDF

查看:117
本文介绍了几个可编辑的PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java API创建DocuSign信封.一切都很完美,我可以添加文档,收件人和标签.

I'm working on creating a DocuSign envelope with the Java API. Everything is perfect, I can add documents, recipients and tabs.

现在,我想利用可编辑的PDF.我看到DocuSign能够将可编辑的PDF标签转换为DocuSign标签,例如描述

Now, I'd like to take advantage of the editable PDF. I saw than DocuSign is capable of converting editable PDF tabs into DocuSign tabs, like describing here.

我的处境略有不同,因为我可以有几个文档,有些可以填充,有些则不能.

My situation is a little different as I can have several documents, some which are fillable, others that are not.

想象一下,我有三个文件. DocA和DocB是可填充的,而DocC不是可填充的.

Imagine that I have three documents. DocA and DocB are fillable, DocC isn't.

我看到了几种解决方案:

I see several solutions :

  • DocA和DocB都与CompositeTemplate关联,而DocC不在模板中;
  • 三个文档都在CompositeTemplate中.

您认为最好的解决方案是什么?我应该在哪里定义收件人? 您需要知道,一旦发送文件,我将在信封中添加文档和标签.

What do you think is the best solution ? And where am I suppose to define my recipients ? You need to know that I will add documents and tabs into the envelope, once it will be sent.

欢迎任何帮助!谢谢

为什么不解释就投降?

推荐答案

您需要具有一组CompositeTemplates,DocA和DocB将来自ServerTemplates,而DocC将添加为inlineTemplates.我放置了一个示例CompositeTemplate调用,其中templatedId-E5577130-E7C4-4601-B618-95DD79644971正在将文档从第一个复合模板(您的DocA/DocB方案)添加到信封中,而"documentId":"2"来自inlineTemplate.并且收件人在每个组合模板中分别声明.

You need to have an array of compositetemplates, DocA and DocB will come from ServerTemplates and DocC will add as an inlineTemplates. I have put a sample CompositeTemplate calls, where templatedId - E5577130-E7C4-4601-B618-95DD79644971 is having adding document to the envelope from first composite template (Your DocA/DocB scenario) and "documentId" : "2" coming from inlineTemplate. And recipients are declared in each composite templates separately.

POST /restapi/v2/accounts/{{acctID}}/envelopes HTTP/1.1
Host: demo.docusign.net
X-DocuSign-Authentication: <DocuSignCredentials><Username>{{user}}
</Username><Password>{{pwd}}</Password><IntegratorKey>{{IntegratorKey}}
</IntegratorKey></DocuSignCredentials>
Content-Type: multipart/form-data; boundary=BOUNDARY

--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data

{
"emailSubject": "REST example - two docs, one from template and one direct",
"enableWetSign": false,
"enforceSignerVisibility": false,
"status": "created",
"compositeTemplates": [
 {
    "compositeTemplateId": "1",
    "inlineTemplates": [
      {
            "recipients": {
                "signers": [
                 {
                    "email": "abc.from.docusign@gmail.com",
                    "name": "Daffy Duck",
                    "recipientId": "1",
                    "roleName": "Primary_Signer",
                    "tabs":{
                        "textTabs":[
                            {
                                 "documentId":"1",
                                 "pageNumber":"1",
                                 "xPosition":"525",
                                 "yPosition":"750",
                                 "recipientId":"1",
                                 "locked":"true",
                                 "tabLabel":"Primary_TrxID",
                                 "value": "e93k33"
                            }
                        ]
                    }
                  }
                ]
            },
            "sequence": "2"
        }
      ],
       "serverTemplates": 
      [
        {
            "sequence": "1",
            "templateId": "E5577130-E7C4-4601-B618-95DD79644971"
        }
      ]
  },
  {
    "compositeTemplateId": "2",
      "inlineTemplates": [
         {
            "recipients": {
            "signers": [
                {
                    "email": "abc.from.docusign@gmail.com",
                    "name": "Daffy Duck",
                    "recipientId": "1",
                    "roleName": "Primary_Signer",
                    "tabs":{
                        "textTabs":[
                            {
                                 "documentId":"2",
                                 "pageNumber":"1",
                                 "xPosition":"525",
                                 "yPosition":"750",
                                 "recipientId":"1",
                                 "locked":"true",
                                 "tabLabel":"Primary_TrxID",
                                 "value": "e93k33"
                            }
                        ]
                    }
                  }
                ]
            },
            "sequence": "1"
        }
     ],
    "document" : 
    {
        "documentId" : "2",
        "name": "Option2"
    }
   }
  ]
}

--BOUNDARY
Content-Disposition: file; documentid=2; name="Option2"; 
filename="Option2.pdf"; compositeTemplateId=2
Content-Type: application/pdf
Content-Transfer-Encoding: base64

 <DocBytesBase64>

--BOUNDARY--

这篇关于几个可编辑的PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆