sudhangi | Posts: 59

Assign Signer info to Layout Placeholder

0 votes
Hi, I have a requirement where I need to assign Signer details to a specific placeholder in a layout. How can I achieve this? So if I have a list of Signers and a list of placeholders how do I associate the Signer info to the Placeholder and apply that corresponding layout to the document? Furthermore if I have less number of signers than the number of placeholders(in the layout); I need to delete all the unused signature blocks from the main document to which the layout was applied. Thanks, Sudhangi

Approved Answer
harishaidary | Posts: 1812

Reply to: Assign Signer info to Layout Placeholder

0 votes

Hi Sudhangi, I've answered your question in previous post you created but I never got any feedback from you. https://community.onespan.com/forum/get-layoutid-layout-name In the case you have less signers than placeholders, then you will need to delete the placeholders.


Jayanta | Posts: 12

Reply to: Assign Signer info to Layout Placeholder

0 votes
Hi Haris, I am using the following code block which works fine for assignment of signers for specific signature blocks: Placeholder p0 = new Placeholder( "Signer1"); signer=SignerBuilder.newSignerWithEmail("[email protected]") .withFirstName("sasgf") .withLastName("asadjh").replacing(p0); Now I need to remove the unused placeholders. In this case I have another placeholer "Signer 2" I have tried the following approaches and, neither works: 1. eslClient.getPackage(packageId).removePlaceholder(s); 2. eslClient.getPackageService().removeSigner(packageId, s.getPlaceholderName());; Thanks Jay

Jayanta | Posts: 12

Reply to: Assign Signer info to Layout Placeholder

0 votes
Oh ok I see this works it seems: after assignment of signers and create package, I do the following for(Signer s: eslClient.getPackage(packageId).getPlaceholders()) { System.out.println("Hi+\t"+s.getPlaceholderName()); //eslClient.getPackage(packageId).removePlaceholder(s); eslClient.getPackageService().removeSigner(packageId, s.getId());; }

harishaidary | Posts: 1812

Reply to: Assign Signer info to Layout Placeholder

0 votes
Glad you got it figured out. Sorry for the late reply. I was out on sick leave.

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