简体   繁体   English

Docusign,如何按顺序为单个文档应用多个服务器模板

[英]Docusign, how to apply multiple server templates for a single document in sequence

In Docusign I have two server templates:在 Docusign 我有两个服务器模板:

  • template A has signature on the 3rd page.模板A在第3页有签名。
  • template B on 5th. 5号模板B。

The document to be signed should replace the documents of the templates, and be a combination of A+B, so it would have signatures in 3rd and 8th page, it should combine the two server templates one AFTER another.待签名的文件应该替换模板文件,并且是A+B的组合,所以在第3页和第8页会有签名,应该将两个服务器模板一个接一个地组合起来。

However, what's happening is that both templates get applied to the beginning of the document, so signatures are on pages 3 and 5.但是,发生的情况是两个模板都应用于文档的开头,因此签名位于第 3 页和第 5 页。

How can I sequence the server templates to indicate they should not overlap over each other, be placed one after another instead?如何对服务器模板进行排序以指示它们不应相互重叠,而是一个接一个地放置?

Here is the composite template I'm trying to build to achieve that这是我正在尝试构建以实现该目标的复合模板

{
    'composite_template_id': None,
    'document': {
        'document_base64': '...',
        'document_id': 3,
        'file_extension': 'pdf',
        'name': 'Sample file.pdf',
    },
    'server_templates': [
        {
            'sequence': '1',
            'template_id': 'e9e2******'
        },
        {
            'sequence': '2',
            'template_id': 'e269******'
        }
    ],
    'inline_templates': [
        {
            'recipients': {
                'carbon_copies': [],
                'signers': [
                    {
                        'client_user_id': '2',
                        'email': 'bobtest@example.com',
                        'name': 'Bob Test',
                        'recipient_id': '2',
                        'role_name': 'Signer',
                    }
                ],
                },
            'sequence': '3'
        }
    ],
}

Expected result: the document be signed with signatures in pages 3 and 8. Current result: signatures are being placed in pages 3 and 5.预期结果:文档在第 3 页和第 8 页签署。当前结果:正在将签名放置在第 3 页和第 5 页。

When you apply a template to a document you are contributing, it takes all the non-document elements, ie recipients/roles, their tabs, and envelope settings and applies it to the provided document.当您将模板应用于您正在贡献的文档时,它会采用所有非文档元素,即收件人/角色、他们的选项卡和信封设置,并将其应用于提供的文档。 So that is why applying your two templates to the one document results in signHere tabs placed on pages 3 and 5.这就是为什么将您的两个模板应用于一个文档会导致第 3 和第 5 页上放置signHere选项卡的原因。
To get your desired result, do one of the following:要获得所需的结果,请执行以下操作之一:

  • Make sure the second template has enough "padding pages" to cover the leading page content, so that the page numbering coincides with the contributed long document.确保第二个模板有足够的“填充页”来覆盖前页内容,以便页码与贡献的长文档一致。
  • Break (or retain) the long document as two separate documents.将长文档拆分(或保留)为两个单独的文档。 Contribute two documents as two separate composites, applying the appropriate template to each.将两个文档作为两个单独的复合材料提供,对每个文档应用适当的模板。
  • If the document is dynamically generated and the page length varies each time, use a different strategy to place the signHere tabs, ie use PDF fillable form fields and set transformPdfFields to true, or add anchor text to the text content and specify anchors (and maybe offsets) for the tab placement.如果文档是动态生成的并且页面长度每次都不同,请使用不同的策略来放置signHere选项卡,即使用 PDF 可填写的表单字段并将transformPdfFields设置为 true,或者将锚文本添加到文本内容并指定锚点(也许偏移量)用于选项卡放置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM