sudhangi | Posts: 59

One Signer 2 documents

0 votes
Hi, Is there a way to build a package such that one signer would sign 2 documents. Here is an algorithm that I am looking at: 1. Use PAckageBuilder to build a package named 'OriginalPackage' 2. Add 'signer1' and 'signer2' to OriginalPackage 3. Add 'document1' and 'document2' to OriginalPackage 4. signer1 will sign only document1 5. signer2 will sign document1 and document2 The problem I get when I use the API is that it does not allow me to assign signer2 to document2. Ofcourse I cannot create a new signer each time because the email address is the same. But even if I try to reuse the same SignerBuilder (of signer2) it would not work. Any thoughts/suggestions? Thanks, Sudhangi

Approved Answer
harishaidary | Posts: 1812

Reply to: One Signer 2 documents

0 votes
Hi Sudhangi, I am not sure why you aren't able to add a second signer. It should be a straightforward scenario. Your DocumentPackage object should look something along these lines:
		DocumentPackage documentPackage = PackageBuilder.newPackageNamed("Group Placeholder")
		.withSigner(SignerBuilder.newSignerWithEmail("[email protected]")
                		.withFirstName("John")
                		.withLastName("Smith")
                		.withCustomId("Signer1"))
                .withSigner(SignerBuilder.newSignerWithEmail("[email protected]")
                		.withFirstName("John")
                		.withLastName("Doe")
                		.withCustomId("Signer2"))
                .withDocument(DocumentBuilder.newDocumentWithName("My Document 1")
                        .fromFile("C:/Users/hhaidary/Desktop/PDFs/first_document.pdf")
                        .withSignature(SignatureBuilder.signatureFor("[email protected]")
                                .onPage(0)
                                .atPosition(100, 100))
                        .withSignature(SignatureBuilder.signatureFor("[email protected]")
                                .onPage(0)
                                .atPosition(100, 200)))
                .withDocument(DocumentBuilder.newDocumentWithName("My Document 2")
                        .fromFile("C:/Users/hhaidary/Desktop/PDFs/second_document.pdf")
                        .withSignature(SignatureBuilder.signatureFor("[email protected]")
                                .onPage(0)
                                .atPosition(100, 300)))
                .build();

sudhangi | Posts: 59

Reply to: One Signer 2 documents

0 votes
HI Haris, Thank you for your response. I guess my problem is that I am using '.withSigner()' functionality at package level, instead of '.signatureFor()' as you have suggested above. I am not sure considering the business logic that I have that '.signatureFor()' will work , but I will give it a shot, in the mean time do think '.withSigner()' is possible in the example you showed? Thanks, Sudhangi

harishaidary | Posts: 1812

Reply to: One Signer 2 documents

0 votes
Sudhangi, withSigner() actually only adds a signer to the package. To add a signature for a signer on a document, you will have to use signatureFor(). This is what actually places the signature in the documents and assigns the signature to the signer you defined using withSigner().

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