This topic contains 3 replies, has 2 voices, and was last updated by  Haris 1 week ago.

  • Author
    Posts
  • Participant
    darrunategui
    Newbie
    Member since: 13.11.2017
    Number of posts: 6

    I am seeing a possible bug where I am creating a package with 1 document, 1 signer, and 1 signature.
    When creating the package, I give the signature a unique name using the

    .WithName(string signatureName)

    method.

    Then, when I use the eSignLive client to retrieve the documentPackage, the signature name is null.

    You can find a simple example shown below

    var signer1 = (Email: "test@gmail.com",
                               Id: "signer-1",
                               FirstName: "David",
                               LastName: "NormalGmail",
                               Company: "ABC Company",
                               Title: "Software Developer");
    
                var doc = (Name: "Testing Doc",
                           Id: "DocId1");
    
                var anchor = (Text: "Please Sign",
                              Occurrence: 0,
                              Character: 0,
                              Width: 200,
                              Height: 50);
    
                PackageId packageId = null;
                using (var fs = File.OpenRead(@"test.pdf"))
                {
                    var pkg = PackageBuilder.NewPackageNamed(doc.Name + " Package")
                                  .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings())
                                  .WithSigner(SignerBuilder
                                              .NewSignerWithEmail(signer1.Email)
                                              .WithCustomId(signer1.Id)
                                              .WithFirstName(signer1.FirstName)
                                              .WithLastName(signer1.LastName)
                                              .WithCompany(signer1.Company)
                                              .WithTitle(signer1.Title))
                                  .WithDocument(DocumentBuilder
                                                .NewDocumentNamed(doc.Name)
                                                .FromStream(fs, DocumentType.PDF)
                                                .WithId(doc.Id)
                                                .WithSignature(SignatureBuilder.SignatureFor(signer1.Email)
                                                               .WithName("MySignatureName")
                                                               .WithPositionAnchor(TextAnchorBuilder.NewTextAnchor(anchor.Text)
                                                                                   .AtPosition(TextAnchorPosition.TOPLEFT)
                                                                                   .WithOccurrence(anchor.Occurrence)
                                                                                   .WithCharacter(anchor.Character)
                                                                                   .WithOffset(0, -anchor.Height)
                                                                                   .WithSize(anchor.Width, anchor.Height)))).Build();
    
                    packageId = eslClient.CreateAndSendPackage(pkg);
    
                }
                // dig into the below retreived variables. You'll see the signature name is null instead of "MySignatureName"
                var package = eslClient.GetPackage(packageId);
                var signatures = eslClient.ApprovalService.GetAllSignableSignatures(package, doc.Id, signer1.Id);
    

    Attached is the test pdf

    Attachments:
    You must be logged in to view attached files.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1181
    Approved answer

    Score

    0

    It seems indeed that there is a bug in the SDK. The signature name does get set but the SDK isn’t able to retrieve it. I will follow up with our maintenance team and get back to you. Are you using the signature name to retrieve data back? If so, you should be assigning an id instead of a name, as it is with ids that retrieval of data is done in esignlive.


    Haris Haidary
    eSignLive Technical Evangelist
    Participant
    darrunategui
    Newbie
    Member since: 13.11.2017
    Number of posts: 6

    Score

    0

    I believe I can use your suggestion and use the SignatureId field instead. My question to you is as follows (as I’m worried it might cause issues)
    Can we re-use the same signatureId for signatures across different documents in different packages?

    e.i.
    Package1
    >Document1
    >Signature1 with Id “myId”

    Package2
    >Document1
    >Signature1 with Id “myId”

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1181

    Score

    1

    Yes of course. Across different packages, you can keep the same ids for documents, signatures, signers, etc. It is only the package id that is unique across your packages, which of course you don’t have control of 🙂


    Haris Haidary
    eSignLive Technical Evangelist

You must be logged in to reply to this topic.