Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Monday, April 1, 2019 at 09:20amHi,
I'm trying to increase the text or print that appears after a signature block is signed (Eg: E-SIGNED by FirstName LastName on Date).
I tried to achieve this using withSize method for the signature, but it didn't work out(the text appears to be only the standard size).
I think it's not working because I'm using the signature block in a field of a form which is generated in the application.
Is there an alternate way (for withSize) or any other approach to achieve this.
Thank you very much in advance.
Best Regards,
Logan
Reply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Monday, April 1, 2019 at 10:41amEslClient eslClient = new EslClient(API_KEY, API_URL); DocumentPackage superDuperPackage = newPackageNamed("Resize Position Extraction Signatures") .withSigner(SignerBuilder.newSignerWithEmail("[email protected]") .withFirstName("first name") .withLastName("last name") .withCustomId("signer1")) .withDocument(newDocumentWithName("First Document") .fromFile(FILE_PATH) .withId("document1") .enableExtraction() .withSignature(signatureFor("[email protected]") .withName("Text1") .withPositionExtracted() .withId(new SignatureId("signature1")) ) .withSignature(signatureFor("[email protected]") .withName("Text2") .withPositionExtracted() ) ) .build(); PackageId packageId = eslClient.createPackage(superDuperPackage); DocumentPackage package1 = eslClient.getPackage(packageId); for (Signature signature : package1.getDocument("First Document").getSignatures()) { if(signature.getId().getId().equals("signature1")) { signature.setWidth(300); signature.setHeight(75); } } eslClient.getApprovalService().updateSignatures(package1, "document1", new ArrayList(package1.getDocument("First Document").getSignatures()));
eslClient.sendPackage(packageId);
Attachment is the test PDF I was using. Hope this could help! DuoReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Monday, April 1, 2019 at 10:49amReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Tuesday, April 23, 2019 at 06:29amReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Tuesday, April 23, 2019 at 08:01amDocumentPackage package1 = eslClient.getPackage(packageId); Document document = package1.getDocument("First Document"); for (Signature signature : document.getSignatures()) { if (signature.getId().getId().equals("signature1")) { try { //step1: reset size signature.setWidth(300); signature.setHeight(75); //step2: reset y java.lang.reflect.Field variableName = signature.getClass().getDeclaredField("y"); variableName.setAccessible(true); variableName.set(signature, signature.getY() - 25); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } eslClient.getApprovalService().updateSignatures(package1, "document1", new ArrayList>(document.getSignatures()));(If you don't want to use reflection, you can also rebuilt the signature object by passing in all of its original field values, main task was to loop through all fields under the signature.) If you have the control of your PDF generator application, you can also consider directly enlarge and adjust location of form which is more straight-forward than adjusting metadata after position extraction was applied. DuoReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Tuesday, April 23, 2019 at 08:30amReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Tuesday, April 23, 2019 at 08:56amReply to: Resize signature text(that appears after signing)? I tried using withSize(wt,ht)
Tuesday, April 23, 2019 at 09:04am