Ragesh Puthiyedath Raju
Ragesh Puthiyedath Raju

Reputation: 3939

How to determine why Signature and Date tabs are coming up (burnishing) on the top left vs where I want them to anchor at the Signature and Date

I am a newbi in DocuSign API programming. I have a MVC 4 application and i create a .cshtml page for create envelop for sending to customer. When i try to create envelop from DocuSign API it's shows error message like Page number not specified in tab element. Page Number or AnchorTabItem missing for tab \"SignHere\"."

Please see my code below.

HTML

<span>
     <br />
       <br />
        <span><b>SIGNATURE:</b></span> <span style="color:white;">pleasesignhereBP</span>
            <br />
            <br />
  <span><b>DATE:</b></span><span style="color:white;">pleasedatehereBP</span>
            <br />
            <br />
        </span>

Code

SignerModel objPerson = new SignerModel();

        TabsModel objPersonTab = new TabsModel();
        List<SignHereModel> lstPersonSignHere = new List<SignHereModel>();
        SignHereModel objPersonSignHere = new SignHereModel();
        objPersonSignHere.DocumentId = "1";
        ////objPersonSignHere.PageNumber = "1";
        objPersonSignHere.RecipientId = "2";
        objPersonSignHere.AnchorString = "pleasesignhereBP";
        objPersonSignHere.AnchorXOffset = ".2";
        objPersonSignHere.AnchorYOffset = ".01";
        objPersonSignHere.AnchorIgnoreIfNotPresent = "true";
        objPersonSignHere.AnchorUnits = "cms";
        lstPersonSignHere.Add(objPersonSignHere);
        objPersonTab.SignHereTabs = lstPersonSignHere;

        List<DateModel> lstPersonDateHere = new List<DateModel>();
        DateModel objPersonDate = new DateModel();
        objPersonDate.DocumentId = "1";
        ////objPersonDate.PageNumber = "1";
        objPersonDate.RecipientId = "1";
        objPersonDate.AnchorString = "pleasedatehereBP";
        objPersonDate.AnchorXOffset = ".2";
        objPersonDate.AnchorYOffset = ".01";
        objPersonDate.AnchorIgnoreIfNotPresent = "true";
        objPersonDate.AnchorUnits = "cms";
        objPersonDate.Value = DateTime.Now.ToShortDateString();
        lstPersonDateHere.Add(objPersonDate);
        objPersonTab.DateTabs = lstPersonDateHere;

        objPerson.Tabs = objPersonTab;

Please Note : commented the PageNumber property

I try to create each document with AnchorBased Positioning because there is a chance to may vary contents in each document. So Pagenumber is not needed for this scenerio.

Any Advice much apperciated.

In Other side

If i uncommented the PagNumber property in code, it's success fully created the envelop, But the signature fields are not placed in appropriate place. Please see the screenshot of the document.

enter image description here

Updates

Please see the documents image that comes from the DocuSign via mail. enter image description here

Upvotes: 0

Views: 382

Answers (1)

David W Grigsby
David W Grigsby

Reputation: 1574

@RageshS I suspect once you put the PDF up, we will find that the "Text" layer of the PDF doesn't have the "Anchor" text you are looking for and since you allowed the tab to be placed if not found, it placed them at the X,Y offset you specified which was probably 1 and 1 respectively, aka the top left.

My recommeded solutions depend on "knowing" a little more about your document PDF and how they will be coming to you:

  1. Allways an Image, the same exact format - Then specify x,y location
  2. Always as Image and Text with your expected anchor string "Signature" as an example - Then Anchor string and don't allow default so it will error if not found
  3. Dynamic, never know - Then this is the hardest, however, you can use the "User Can place tab" feature, except I suggest against this unless you are going to have another person countersign and verify the signature is a "signature" and in the appropriate place"

There are a couple more options based on variations on 1&2 however for the sake of this answer, I will leave it to these and create an infographic and blog post to cover the finer details in the near future.

This is a common problem in any automated esignature integration and a great question with many good solutions depending on the requirements.

Upvotes: 2

Related Questions