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 = <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
}
)
}
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:
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 = "Signature", anchorYOffset = "10", anchorUnits = "pixels",
anchorXOffset = "20"}