This topic contains 1 reply, has 2 voices, and was last updated by  Haris 11 months, 1 week ago.

  • Author
  • Participant
    Member since: 27.07.2017
    Number of posts: 3


    How can i use SDK to set multiple signature block on the same document for a single signer and the values to be passed dynamically.
    I have a list of coordinates which specify the position and size of my signature block for a single signer on a single document. How can i handle that with the SDK in java?

    I am looking forward to loop the process of adding signature fields on the document. The size of list might also vary in every request .

    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450



    Hi Nadiya,

    Here’s an example of what I would do:

    private static void addSignatures(DocumentPackage retrievedPackage, String documentId, Map<String, Coordinates> coord, String signerEmail) {
    	for (Map.Entry<String, Coordinates> entry : coord.entrySet()) {
    		Signature signature = SignatureBuilder.signatureFor(signerEmail)
    				.atPosition(entry.getValue().getX(), entry.getValue().getY())
    		String addedSignature = eslClient.getApprovalService().addSignature(retrievedPackage, documentId, signature);
    public class Coordinates {
        private int X;
        private int Y;
        public Coordinates() {
        public Coordinates(int X, int Y) {
            this.X = X;
            this.Y = Y;
        public int getX() {
            return X;
        public int getY() {
            return Y;
        public void setX(int X) {
            this.X = X;
        public void setY(int Y) {
            this.Y = Y;

    Of course, there are many other ways to accomplish but this should get you going nicely.

    Haris Haidary
    OneSpan Technical Consultant
    • This reply was modified 11 months, 1 week ago by  Haris.

You must be logged in to reply to this topic.