当信封仅包含一个标签时,该标签是可选的,必须与整个单词(AnchorIgnoreIfNotPresent = true
和 AnchorMatchWholeWord = true
)匹配,并且文档,则返回异常:
errorCode: TAB_PAGE_NUMBER_NOT_SPECIFIED
message: Page number not specified in tab element. Page Number or AnchorTabItem missing for tab \"SignHere"\."
该选项卡由锚字符串而不是X / Y位置放置,该位置需要页码。以下是请求:
EnvelopeDefinition envDef = new EnvelopeDefinition
{
EmailSubject = "Here is the email subject!",
EmailBlurb = "Add this blurb!?",
Documents = new List<Document>(),
Recipients = new Recipients
{
Signers = new List<Signer>()
}
};
Signer addSigner = new Signer
{
Email = "fakeemail@email.com",
Name = "Test User",
RoleName = "Role Name",
RecipientId = "1", // Recipient ID must be greater than 0
Tabs = new Tabs
{
SignHereTabs = new List<SignHere>
{
new SignHere
{
DocumentId = "1",
AnchorString = $"signerz1sig", // This anchor string does not exist.
AnchorXOffset = ".25",
AnchorIgnoreIfNotPresent = "true",
AnchorMatchWholeWord = "true",
AnchorUnits = "inches"
}
}
}
};
envDef.Recipients.Signers.Add(addSigner);
envDef.Documents.Add
(
new Document
{
DocumentBase64 = Convert.ToBase64String(request.Stream.ReadAsBytes()),
DocumentId = "1",
Name = "Mutual_NDA_1.pdf"
}
);
envDef.Status = "sent";
EnvelopesApi envelopesApi = new EnvelopesApi(Configuration);
EnvelopeSummary envSummary = envelopesApi.CreateEnvelope(AccountId, envDef);
将AnchorMatchWholeWord
保留为空时,请求成功。如果值为“ false”或“ true”,则它将失败。为什么会这样?