Docusign – 自动放置标签不会显示在base64文档上

huangapple go评论66阅读模式
英文:

Docusign - Auto-Place tabs not show up on base64 document

问题

我正试图在我的一个Base64文档中自动放置多个signHere标签,文档的长度是动态的,基于关键字Signature,但它们都没有被附加。这是我的代码片段:

val base64String = <some_base64_string>

EnvelopeDefinition().apply {
    emailSubject = "..."
    emailBlurb = "..."
    documents = listOf(
        Document().apply {
            documentId = "1"
            name = "demo.pdf"
            documentBase64 = base64String
        }
    )
    recipients = listOf(
        Signer().apply {
            email = <email>
            name = <name>
            recipientId = "1"
            roleName = "Client"
            clientUserId = id
            val tabs = Tabs()
            tabs.signHereTabs = listOf(
                SignHere().apply {
                    anchorString = "Signature"
                    name = "signature-$id"
                    tabLabel = "sign-here-$id"
                }
            )
            this.tabs = tabs
        }
    )
}
英文:

I am trying to auto-place multiple signHere tabs in one of my base64 documents where the length of the document is dynamic, based on a keyword Signature, but none of them are being attached. Here's my code snippet:

val base64String = &lt;some_base64_string&gt;

EnvelopeDefinition().apply {
    emailSubject = &quot;...&quot;
    emailBlurb = &quot;...&quot;
    documents = listOf(
        Document().apply {
            documentId = &quot;1&quot;
            name = &quot;demo.pdf&quot;
            documentBase64 = base64String
        }
    )
    recipients = listOf(
        Signer().apply {
            email = &lt;email&gt;
            name = &lt;name&gt;
            recipientId = &quot;1&quot;
            roleName = &quot;Client&quot;
            clientUserId = id
            val tabs = Tabs()
            tabs.signHereTabs = listOf(
                SignHere().apply {
                    anchorString = &quot;Signature&quot;
                    name = &quot;signature-$id&quot;
                    tabLabel = &quot;sign-here-$id&quot;
                }
            )
            this.tabs = tabs
        }
    )
}

答案1

得分: 0

你正在使用一个模板(roleName),但同时提供了自己的文档和自己的选项卡。

模板的目的是具有重复的流程,其中某些内容会重复出现。可以是文档、选项卡或接收者。

不确定你在尝试做什么,但可以选择以下方式之一:

  1. 不使用模板。
  2. 在模板上定义选项卡。
  3. 在模板中包含文档。

你目前的方式不会起作用,因为选项卡不会应用于新文档。

对于你的选项卡代码,尝试类似以下的方式:

sign_here1 = {
anchorString = "Signature", anchorYOffset = "10", anchorUnits = "pixels",
anchorXOffset = "20"
}

英文:

You are using a template (roleName) but you also provide your own document and your own tabs.

The purpose of a template is to have a repetitive process where something is repeated. Either the documents or the tabs or the recipients.

Not sure what you're trying to do here, but either:

  1. Don't use a template.
  2. Have the tabs defined on the template.
  3. Have the document in the template.

The way you have it won't work cause the tabs won't be applied to the new document.

For your tab code , try something like this:

sign_here1 = {
    anchorString = &quot;Signature&quot;, anchorYOffset = &quot;10&quot;, anchorUnits = &quot;pixels&quot;,
    anchorXOffset = &quot;20&quot;}

huangapple
  • 本文由 发表于 2023年6月16日 11:24:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76486781.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定