Hristo Vasilev
Hristo Vasilev

Reputation: 13

DocuSign auto place do not anchor the tab on the right place

I have c# application that is using DocuSign APIService to sign up documents created in the application.

This is my code for the tab:

Tab tab = new Tab();
tab.DocumentID = "1";
tab.RecipientID = "1";
tab.Type = TabTypeCode.SignHere;
tab.AnchorTabItem = new AnchorTab();
//tab.AnchorTabItem.AnchorTabString = "Sign Here (Signer):";
tab.AnchorTabItem.AnchorTabString = string.Format("Sign Here ({0}):", signerName);
tab.AnchorTabItem.IgnoreIfNotPresent = true;
tab.AnchorTabItem.Unit = UnitTypeCode.Pixels;
tab.AnchorTabItem.UnitSpecified = true;
tab.AnchorTabItem.XOffset = 0;
tab.AnchorTabItem.YOffset = 0;

This is from DocuSign documentation:

It does this by finding the bounding box of the anchor text (basically the rectangle containing the text) and using the Lower Right corner of the bounding box as the Lower Left corner of the Tab.

Unfortunately the signature box appears over the anchor text, not after.

I tried the auto place with template - same problem.

Is this a bug or do I do something wrong?

Upvotes: 1

Views: 1750

Answers (1)

Praveen Reddy
Praveen Reddy

Reputation: 7393

The documentation link you mentioned is quite old and might not be accurate. If no offsets are specified signature box will appear over the anchor text.

See the following for Official Documentation


You have couple of options

Option 1 : Using Anchor Offsets :

Set the following properties to adjust the location of the anchor tab.

tab.AnchorTabItem.Unit = UnitTypeCode.Pixels;
tab.AnchorTabItem.UnitSpecified = true;
tab.AnchorTabItem.XOffset = 0;
tab.AnchorTabItem.YOffset = 0;

From Documentation :

  • anchorXOffset : Specifies the X axis location of the tab, in achorUnits, relative to the anchorString.
  • anchorYOffset : Specifies the Y axis location of the tab, in achorUnits, relative to the anchorString.

Option 2: Using Static Anchor Text

Another option is add a static anchor text to the document and change the color of the anchor text to white or to the background color of the document. This way the anchor text does not appear when the document is viewed, making the anchor text invisible to the recipients of the document. More Info here

See more tips and tricks for Anchor Tabs here

Upvotes: 2

Related Questions