在我的应用程序中,我有一个要求,我需要为多个文件发送信封。我通过使用复合模板部分地实现了这一点。但是在下面描述的场景中存在问题。
“信封包含多个模板(使用复合模板)以及带有元数据的 PDF 文档(以及 pdf 字节)。”
我能够用我的文档 pdf 字节和元数据发送信封,但无法将它与模板结合在同一个信封中。
你能提出前进的道路吗?
更新:我已经为上述场景生成了信封,但遇到了问题——现在的问题是,我正在使用锚文本在此 pdf 文档中放置“在此处签名”选项卡,不幸的是,锚文本也出现在其他模板中。这导致模板上的两个标志选项卡(这些是正确的模板并且不是空的)带有锚文本。
添加 JSON 字符串以提高可见性。请注意,我正在发送 PDF 字节以及此 json 字符串,该字符串充当空模板的支持文档。
{
"status": "sent",
"templateId": "Empty Template ID(This template does not contain anything and just a blank pdf page in background)****************",
"templateRoles": [{
"name": "****************",
"accessCode": "1234",
"roleName": "employee",
"email": "****************",
"recipientId": "1",
"tabs": {
"textTabs": [{
"name": "Hyperlink Here",
"documentId": "1",
"anchorString": "Employee Signature:",
"anchorXOffset": "185",
"anchorYOffset": "-39",
"anchorUnits": "pixels",
"font": "arial",
"fontSize": "size7",
"fontColor": "brightblue",
"value": ": Click Here",
"tabLabel": "#HREF termsAndConditionLink"
}],
"dateSignedTabs": [{
"name": "DateSigned",
"tabLabel": "DateSigned",
"documentId": "1",
"additionalProperties": {
},
"anchorString": "Employee Signature:",
"anchorXOffset": "430",
"anchorYOffset": "1",
"anchorUnits": "pixels"
}],
"signHereTabs": [{
"documentId": "1",
"anchorString": "Employee Signature:",
"anchorXOffset": "180",
"anchorYOffset": "10",
"anchorUnits": "pixels",
"scaleValue": 0.0,
"anchorIgnoreIfNotPresent": "true"
}]
}
}],
"brandId": "Brand****************",
"documents": [{
"name": "Doc2.pdf",
"documentId": "1"
}],
"compositeTemplates": [{
"serverTemplates": [{
"sequence": "1",
"templateId": "Proper Template ID****************"
}],
"inlineTemplates": [{
"sequence": "1",
"recipients": {
"signers": [{
"name": "****************",
"accessCode": "1234",
"roleName": "employee",
"email": "****************",
"recipientId": "1",
"tabs": {
"textTabs": [{
"value": "VALUE1",
"tabLabel": "TEXTTAB1"
},
{
"value": "VALUE2",
"tabLabel": "TEXTTAB2"
}]
}
}]
}
}]
}],
"emailBlurb": "Please sign document using link below",
"emailSubject": "Please complete the documents."
}