Reputation: 3939
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.
Updates
Please see the documents image that comes from the DocuSign via mail.
Upvotes: 0
Views: 382
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:
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