0

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

Ragesh P Raju
  • 3,879
  • 14
  • 101
  • 136
  • Possible duplicate of [Error calling CreateEnvelope : TAB\_PAGE\_NUMBER\_NOT\_SPECIFIED](https://stackoverflow.com/questions/49447151/error-calling-createenvelope-tab-page-number-not-specified) – mjwills Mar 26 '18 at 12:09
  • 2
    @rageshS Can you put a copy of the actual PDF vs a PNG? This will help me determine if it is just an image, or if there is "text" on the text layer. – David W Grigsby Mar 26 '18 at 12:11
  • 2
    @rageshS Also, Suggest changing question title to "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 using the DocuSign API – David W Grigsby Mar 26 '18 at 12:14
  • 2
    @RageshS Perfect, and I hope you will consider updating Question Title as well. I sent you a skype request also if you have ability/time to discuss on Skype. Of course I want to make sure we get this documented here as well so that others can benefit from StackOverflow's amazing Q&A platform. :-) – David W Grigsby Mar 26 '18 at 12:27
  • @David you are great.... I will update the title – Ragesh P Raju Mar 26 '18 at 12:32
  • 2
    @RageshS Thank you, I see what you are driving at, yet we need a specific reproduction. So may I suggest, turn on logging like discussed in the previous question, send me the actual Json in the log (downloads as a zip) it captures (minus any username/password/integrator key info which shouldn't be in there, just make sure) and also send "sample" pdf you are using above to the box folder I sent you at your gmail account please? – David W Grigsby Mar 26 '18 at 13:03
  • @RageshS Also understand it is the evening for you about 6:45pm in your time zone, so I understand if you need to work on this tomorrow. – David W Grigsby Mar 26 '18 at 13:16
  • 2
    @RageshS So here is the status - Log of API calls doesn't have the API call for Envelope Create and the pdf is really an image aka doesn't have any "Text" to anchor to. I suspect this is because the "Real" one you can't send and the log file has the same issue, so I will reverse the process and create a PDF you can use and API call in postman you can use to see the actual values set so you can do the same in the SDK. This is an article I have been wanting to write for a while, so this is good timing and will have something for you by the time you get to the office tomorrow local time. – David W Grigsby Mar 27 '18 at 10:34
  • @David, I missed that point. Now the PDF file rendering with text content now i can create envelop with out any issue. Thank you very much. You are great...... – Ragesh P Raju Mar 27 '18 at 11:32
  • @RageshS That is excellent! – David W Grigsby Mar 27 '18 at 11:47

1 Answers1

2

@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.

David W Grigsby
  • 1,554
  • 1
  • 13
  • 23
  • 1
    I missed that point. Now the PDF file rendering with text content now i can create envelop with out any issue. Thank you very much. You are great...... – Ragesh P Raju Mar 27 '18 at 11:33
  • 1
    I have a question about 'ConnectURL' section. Please see this question https://stackoverflow.com/questions/49730453/docusign-connecturl-always-shows-the-controller-for-path-xxx-xxx-was-not-fo – Ragesh P Raju Apr 09 '18 at 10:10
  • 1
    @RageshS see my response and comments, thanks for the ping :-) – David W Grigsby Apr 09 '18 at 13:01