tehpao | Posts: 17

How to add multiple signature anchor

0 votes
Using Apex SDK i am trying to create package with pdf file/document and send it to esignlive server After this I am trying to do something ..... request.setEndpoint('https://sandbox.esignlive.com/api/packages/' + pkgID + '/documents/signed_documents'); To sign the document. Problem is that pdf document has 3 pages and all need to signed at the bottom. when I make above API call it only sign first page and skip other two pages So I am trying to figure out how to sign all 3 pages Any help will be appreciated. Thank you -Ted

harishaidary | Posts: 1812

Reply to: How to add multiple signature anchor

0 votes
Have a look at this feature guide: https://developer.esignlive.com/guides/feature-guides/bulk-sign-for-a-signer/#rest-api It shows the steps you need to follow in order to auto-sign using the REST API. Let me know if this resolves your issue.

tehpao | Posts: 17

Reply to: How to add multiple signature anchor

0 votes
Thanks I was able to sign the documents but one of the documents which are in pdf format has 3 pages and it only sign first page and no sign on page #2 and 3.

tehpao | Posts: 17

Reply to: How to add multiple signature anchor

0 votes
Here is my code snippet ESignLiveAPIObjects.ExtractAnchor ea1 = new ESignLiveAPIObjects.ExtractAnchor(); ea1.text = 'Customer SIGN'; ea1.index = 0; ea1.width = 200; ea1.height = 70; ea1.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPRIGHT; ea1.characterIndex = 0; ea1.leftOffset = 0; ea1.topOffset = 10; ESignLiveAPIObjects.Field f1 = new ESignLiveAPIObjects.Field(); f1.type = 'SIGNATURE'; f1.page = 1; f1.extract = false; f1.left = 0; f1.subtype = 'FULLNAME'; f1.top = 0; f1.extractAnchor = ea1; ESignLiveAPIObjects.ExtractAnchor ea2 = new ESignLiveAPIObjects.ExtractAnchor(); ea2.text = 'Customer SIGN'; ea2.index = 0; ea2.width = 200; ea2.height = 70; ea2.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPRIGHT; ea2.characterIndex = 0; ea2.leftOffset = 0; ea2.topOffset = 10; ESignLiveAPIObjects.Field f2 = new ESignLiveAPIObjects.Field(); f2.type = 'SIGNATURE'; f2.page = 2; f2.extract = false; f2.left = 0; f2.subtype = 'FULLNAME'; f2.top = 0; f2.extractAnchor = ea2; ....... ....... ....... ESignLiveAPIObjects.Approval approval1 = new ESignLiveAPIObjects.Approval(); approval1.role = 'TedK'; approval1.fields = new List {f1, f2}; At the bottom of all pdf pages there is section for custom signature and date and it has Text: Customer SIGN

harishaidary | Posts: 1812

Reply to: How to add multiple signature anchor

0 votes
Yes, I understand that. In your request to https://sandbox.esignlive.com/api/packages/’ + pkgID + ‘/documents/signed_documents, did you include the "documents" object? (as stated in the guide) Also, are the signatures on the document for the same signer?

tehpao | Posts: 17

Reply to: How to add multiple signature anchor

0 votes
Thanks for quick response. Yes I did include doc. That document has 3 pages and only first page get signed and not other pages.

harishaidary | Posts: 1812

Reply to: How to add multiple signature anchor

0 votes
Do you mind giving me a package id so I can have a look and possibly run a test?

tehpao | Posts: 17

Reply to: How to add multiple signature anchor

0 votes
here is one C-RKckWKUJl8_zFLqatm62bJFPY= In convention -> Signer Label: there is field Occurrence which tell you after how many Occurrence of your anchor text add the label or sign so I am to do similar thing. As my document has 3 pages and each has Text: Custom Sign at the bottom

tehpao | Posts: 17

Reply to: How to add multiple signature anchor

0 votes
Figured out a solution and I dont know if it is right way to do it I have to do something like this ESignLiveAPIObjects.ExtractAnchor ea = new ESignLiveAPIObjects.ExtractAnchor(); ea.text = 'HEADQUARTER'; ea.index = 0; // page number 0 ea.width = 200; ea.height = 70; ea.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPRIGHT; ea.characterIndex = 0; ea.leftOffset = 0; ea.topOffset = 10; ESignLiveAPIObjects.Field f1 = new ESignLiveAPIObjects.Field(); f1.type = 'SIGNATURE'; f1.page = 0; f1.extract = true; f1.left = 0; f1.subtype = 'FULLNAME'; f1.top = 0; f1.extractAnchor = ea; ESignLiveAPIObjects.ExtractAnchor ea2 = new ESignLiveAPIObjects.ExtractAnchor(); ea2.text = 'HEADQUARTER'; ea2.index = 1; // page number 2 ea2.width = 200; ea2.height = 70; ea2.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPRIGHT; ea2.characterIndex = 0; ea2.leftOffset = 0; ea2.topOffset = 10; ESignLiveAPIObjects.Field f2 = new ESignLiveAPIObjects.Field(); f2.type = 'SIGNATURE'; f2.page = 0; f2.extract = true; f2.left = 0; f2.subtype = 'FULLNAME'; f2.binding = '{approval.signed}'; f2.top = 0; f2.extractAnchor = ea2; ESignLiveAPIObjects.ExtractAnchor ea3 = new ESignLiveAPIObjects.ExtractAnchor(); ea3.text = 'HEADQUARTER'; ea3.index = 2; // page number 3 ea3.width = 200; ea3.height = 70; ea3.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPRIGHT; ea3.characterIndex = 0; ea3.leftOffset = 0; ea3.topOffset = 10; ESignLiveAPIObjects.Field f3 = new ESignLiveAPIObjects.Field(); f3.type = 'SIGNATURE'; f3.page = 0; f3.extract = true; f3.left = 0; f3.subtype = 'FULLNAME'; f3.binding = '{approval.signed}'; f3.top = 0; f3.extractAnchor = ea3; ..... ..... ...... ESignLiveAPIObjects.Approval approval1 = new ESignLiveAPIObjects.Approval(); approval1.role = 'TedDoe'; approval1.fields = new List {f1}; ESignLiveAPIObjects.Approval approval2 = new ESignLiveAPIObjects.Approval(); approval2.role = 'TedDoe'; approval2.fields = new List {f2}; ESignLiveAPIObjects.Approval approval3 = new ESignLiveAPIObjects.Approval(); approval3.role = 'TedDoe'; approval3.fields = new List {f3}; ESignLiveAPIObjects.Document doc1 = new ESignLiveAPIObjects.Document(); doc1.name = 'testDocumentOne'; doc1.id = 'testDocumentOneid'; doc1.approvals = new List {approval1, approval2, approval3}; Is the above codes right way to do it. Hi Harish please can you tell me why I cant do approval.fields = new List {f1,f2, f3}; for f.type='SIGNATURE' so I have to split into 3 parts ESignLiveAPIObjects.Approval approval1 = new ESignLiveAPIObjects.Approval(); approval1.role = 'TedDoe'; approval1.fields = new List {f1}; ESignLiveAPIObjects.Approval approval2 = new ESignLiveAPIObjects.Approval(); approval2.role = 'TedDoe'; approval2.fields = new List {f2}; ESignLiveAPIObjects.Approval approval3 = new ESignLiveAPIObjects.Approval(); approval3.role = 'TedDoe'; approval3.fields = new List {f3}; ESignLiveAPIObjects.Document doc1 = new ESignLiveAPIObjects.Document(); doc1.name = 'testDocumentOne'; doc1.id = 'testDocumentOneid'; doc1.approvals = new List {approval1, approval2, approval3}; but when try to do f3.type = 'INPUT''; then I can do ESignLiveAPIObjects.Approval approval1 = new ESignLiveAPIObjects.Approval(); approval1.role = 'TedDoe'; approval1.fields = new List {f1, f2, f3}; and dont have to split in 3 parts

harishaidary | Posts: 1812

Reply to: How to add multiple signature anchor

0 votes
Hi Ted, Yes, that is in fact the right way to do it. In eSignLive, each approval has to have it's own field in the json payload. Here's an example payload to better understand:
{
  "roles": [
    {
      "id": "Dealer",
      "type": "SIGNER",
      "signers": [
        {
          "firstName": "John",
          "lastName": "Smith",
          "email": "[email protected]"
        }
      ],
      "name": ""
    },
    {
      "id": "Signer0",
      "type": "SIGNER",
      "signers": [
        {
          "firstName": "SIGNER_FIRST_NAME",
          "lastName": "SIGNER_LAST_NAME",
          "email": "[email protected]"
        }
      ],
      "name": ""
    },
    {
      "id": "Signer1",
      "type": "SIGNER",
      "signers": [
        {
          "firstName": "test",
          "lastName": "test",
          "email": "[email protected]"
        }
      ],
      "name": ""
    }
  ],
  "documents": [
    {
      "name": "TEST2 32.pdf",
      "index": 0,
      "approvals": [
        {
          "fields": [
            {
              "type": "SIGNATURE",
              "width": 200,
              "height": 50,
              "extract": false,
              "extractAnchor": {
                "text": "Dealer Signature",
                "index": 0,
                "width": 150,
                "height": 40,
                "anchorPoint": "TOPRIGHT",
                "characterIndex": 16,
                "leftOffset": 10,
                "topOffset": -28
              },
              "left": 0,
              "subtype": "FULLNAME",
              "top": 0
            }
          ],
          "role": "Dealer"
        },
        {
          "fields": [
            {
              "type": "SIGNATURE",
              "width": 200,
              "height": 50,
              "extract": false,
              "extractAnchor": {
                "text": "Dealer Signature",
                "index": 1,
                "width": 150,
                "height": 40,
                "anchorPoint": "TOPRIGHT",
                "characterIndex": 16,
                "leftOffset": 10,
                "topOffset": -28
              },
              "left": 0,
              "subtype": "FULLNAME",
              "top": 0
            }
          ],
          "role": "Dealer"
        },
        {
          "fields": [
            {
              "type": "SIGNATURE",
              "width": 200,
              "height": 50,
              "extract": false,
              "extractAnchor": {
                "text": "Signed for and on behalf of Dealer",
                "index": 0,
                "width": 150,
                "height": 40,
                "anchorPoint": "BOTTOMLEFT",
                "characterIndex": 1,
                "leftOffset": -5,
                "topOffset": 3
              },
              "left": 0,
              "subtype": "FULLNAME",
              "top": 0
            }
          ],
          "role": "Dealer"
        }
      ],
      "extract": true
    }
  ],
  "name": "Test Package REST",
  "type": "PACKAGE",
  "language": "en",
  "emailMessage": "",
  "description": "New Package",
  "autoComplete": true,
  "status": "SENT"
}

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off