unable to send two documents for signature
Tuesday, February 9, 2016 at 10:16amHello there,
I am trying to send two documents to be signed by the same person. so I am creating two document builders adding the email address to each one of them, but it keeps failing with the error that the email is already in use for this package. The PDF I am using has form fields in it with field extraction enabled. This is my code and I need to get this working. I appreciate your help.
for(DocumentInfo document: documents){
// this is the document representation of the objects that need to
// be signed.
DocumentBuilder documentBuilder = this.getDocumentBuilder(document);
// add all the signatures to sign the document.
List signatures = document.getSignatures();
String email = null;
// iterate over the signatures and set the properties
// according to the signers
for(Signature signature: signatures){
email = signature.getEmail();
// create the signer and set it on the package.
SignerBuilder signerBuilder = getSignerBuilder(signature);
packageBuilder.withSigner(signerBuilder);
// go over all the signature fields.
List signatueFields = signature.getSignatureField();
for(SignatureField signatureField: signatueFields){
// create the signature builder and set it
// on the document.
SignatureBuilder signatureBuilder = this.getSignatureBuilder(email, signatureField);
documentBuilder.withSignature(signatureBuilder);
}
}
packageBuilder.withDocument(documentBuilder);
}
// create the document package
DocumentPackage documentPackage = packageBuilder.build();
PackageId packageId = eslClient.createPackage( documentPackage );
log.info("Package successfully sent to esign - pacakge ID: " + packageId.getId());
// send the package
eslClient.sendPackage( packageId );
Reply to: unable to send two documents for signature
Monday, April 18, 2016 at 11:40amReply to: unable to send two documents for signature
Tuesday, August 23, 2016 at 08:40am