dsthmehta

Changing Silanis "Capture Your Signature" to "Click to Initial" Functionality

0 votes
Hi, I am currently using the esign live in my web application. I am currently using the "capture your signature" functionality in order to capture signatures at various places in my documents by capturing the cordinates and then send those cordinates so that signature blocks are drawn. I, now, have a new requirement of using the "click to initial" functionality instead of capturing signature. Hence, I was wondering if this is possible and if so, how big of an effort it is. It would be great if you can provide some examples, in java, on how I can do this. Any pointers, suggestions are welcomed. Thanks, Hardik

Reply to: Changing Silanis "Capture Your Signature" to "Click to Initial" Functionality

0 votes
Hey Hardik, If you are already using "capture signature" (hand drawn), then switching to "click to initial" is a simple process. You only need to change "captureFor" to "initialsFor" when building your signature. You can find below a sample code on how to use the "click to initial" feature in Java.
package com.esignlive.example;

import com.silanis.esl.sdk.DocumentPackage;
import com.silanis.esl.sdk.EslClient;

import static com.silanis.esl.sdk.builder.DocumentBuilder.newDocumentWithName;
import static com.silanis.esl.sdk.builder.PackageBuilder.newPackageNamed;
import static com.silanis.esl.sdk.builder.SignatureBuilder.initialsFor;
import static com.silanis.esl.sdk.builder.SignerBuilder.newSignerWithEmail;

public class captureInitial {
	
	public static String API_KEY = "YOUR_API_KEY";
        public static String API_URL = "https://sandbox.esignlive.com/api";
	
	public static void main(String[] args) {
		
		EslClient eslClient = new EslClient( API_KEY, API_URL );
		
		DocumentPackage myPackage = newPackageNamed("Signature Initial")
                .withSigner(newSignerWithEmail("[email protected]")
                        .withFirstName("John")
                        .withLastName("Doe"))
                .withDocument(newDocumentWithName("My sample document")
                        .fromFile("PATH_TO_YOUR_FILE")
                        .withSignature(initialsFor("[email protected]") 
								.onPage(0) 
								.atPosition(100, 140)))
                .build();
		
		eslClient.createAndSendPackage(myPackage);
	}
} 
Haris Haidary OneSpan Technical Consultant

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