mouli

Issue with adding multiple signatures for a single signer

0 votes
Hi, I am using document extraction with field to identify the signature position for a signer. If i have a pdf with 3 signatures with field names ExecutedBy_p{counter}, only the last signature is coming in place. Rest all are showing on the top of the document. If i have two signatures added for a signer signatures.add(SignatureBuilder.signatureFor(signer.getEmailAddress()).withName("ExecutedBy_p1").withPositionExtracted().build()); .. .. signatures.add(SignatureBuilder.signatureFor(signer.getEmailAddress()).withName("ExecutedBy_p7").withPositionExtracted().build()); signature with ExecutedBy_p7 is placed right, rest all are showing on top of document Am i doing something wrong?

Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Mouli, Which SDK function are you invoking? Because I saw you added Signature objects to a list. If I added the signatures when package creation like below, all signatures can be recognized:
		EslClient eslClient = new EslClient(API_KEY, API_URL);

		DocumentPackage pkg1 = PackageBuilder.newPackageNamed("Example Package " + System.currentTimeMillis())
				.withSigner(SignerBuilder.newSignerWithEmail("[email protected]")
						.withFirstName("John")
						.withLastName("Smith"))
				.withDocument(DocumentBuilder.newDocumentWithName("document 1")
						.fromFile("your_file_path")
						.withSignature(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p1").withPositionExtracted())
						.withSignature(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p2").withPositionExtracted())
						.withSignature(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p3").withPositionExtracted())
						.withSignature(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p4").withPositionExtracted())
						.enableExtraction()
						)
				.build();

		PackageId createPackageOneStep = eslClient.createPackage(pkg1);
		System.out.println(createPackageOneStep);
Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Duo, I am using something like the code attached below

Attachments

Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Mouli, I broke the above code down into pieces:
	public static void main(String[] args) {
		final String API_KEY = "your_api_key";
		final String API_URL = "https://sandbox.esignlive.com/api";

		EslClient eslClient = new EslClient(API_KEY, API_URL);

		 PackageBuilder packageBuilder = PackageBuilder.newPackageNamed("Example Package " + System.currentTimeMillis())
				.withSigner(SignerBuilder.newSignerWithEmail("[email protected]").withFirstName("John")
						.withLastName("Smith")
						);
		
		Document document = DocumentBuilder.newDocumentWithName("document 1")
		.fromFile("your_file_path")
		.enableExtraction()
		.build();
		
		List signatureList = new ArrayList();
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p1")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p2")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p3")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p4")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p5")
				.withPositionExtracted().build());
		
		document.addSignatures(signatureList);
		packageBuilder.withDocument(document);

		PackageId createPackageOneStep = eslClient.createPackage(packageBuilder.build());
		System.out.println(createPackageOneStep);

	}
Please kindly have a quick try and see whether this is what you expected. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments

Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi, I executed this code on machine. I am getting the document for sign. But it does not add signatures at all. I can share the pdf i have with you. Do you have an email address i can send it to?

Reply to: Issue with adding multiple signatures for a single signer

0 votes
yes, please send the PDF to [email protected] so that I can test based on your PDF. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue with adding multiple signatures for a single signer

0 votes
Sent you the pdf. i am not able to post the rest of my reply. So i am attaching as an image below. Please review

Attachments

Reply to: Issue with adding multiple signatures for a single signer

0 votes
public static void main(String[] args) {
		final String API_KEY = "your_api_key";
		final String API_URL = "https://sandbox.esignlive.com/api";

		EslClient eslClient = new EslClient(API_KEY, API_URL);

		 PackageBuilder packageBuilder = PackageBuilder.newPackageNamed("Example Package " + System.currentTimeMillis())
				.withSigner(SignerBuilder.newSignerWithEmail("[email protected]").withFirstName("John")
						.withLastName("Smith")
						);
		
		Document document = DocumentBuilder.newDocumentWithName("document 1")
		.fromFile("your_file_path")
		.enableExtraction()
		.build();
		
		List signatureList = new ArrayList();
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p1")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p2")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p3")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p4")
				.withPositionExtracted().build());
		signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p5")
				.withPositionExtracted().build());
                signatureList.add(SignatureBuilder.signatureFor("[email protected]").withName("ExecutedBy_p7")
				.withPositionExtracted().build());
		
		document.addSignatures(signatureList);
		packageBuilder.withDocument(document);

		PackageId createPackageOneStep = eslClient.createPackage(packageBuilder.build());
		System.out.println(createPackageOneStep);

	}
If you execute this, you will see one signature field at the end

Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Mouli, I see what you meant. A quick workaround is, to replace the signature form type with the normal text form type, I've sent the changed PDF to your email. Tomorrow, I will create a support ticket on your behalf to have further investigation into the PDF you provided. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Duo, Thank you. correct if i understood it wrong. You are suggesting to change the pdf field type from signature to text? or are u suggesting to use text anchor tags? I have not received the pdf file. Thanks Mouli

Reply to: Issue with adding multiple signatures for a single signer

0 votes
Hi Mouli, After some more test, I just found out that neither the signature forms nor text forms in your PDF can be extracted by OneSpan Sign system, so the suggestion I made above may not be applicable in your case, my apologies for that. May I know which PDF generator you are using and probably some code snippet generating PDF forms? At the same time, I've made a support ticket on your behalf and let's see what we can find from further investigation. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Issue with adding multiple signatures for a single signer

1 votes
It was developed a long way back. I know that is being generated using iText. As for the code snippet, i cannot share it with you as i myself dont have much knowledge in it. It would take time.

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