@Test public void clipField() { PDField field = PDFieldFactory.createFieldAddingChildToParent(new PDAcroForm(new PDDocument()), dictionary, null); assertTrue(SignatureClipper.clipSignature(field)); assertFalse(field.getCOSObject().containsKey(COSName.V)); assertFalse(field.getCOSObject().containsKey(COSName.SV)); assertFalse(field.getCOSObject().containsKey(COSName.LOCK)); }
public static boolean clipSignature(PDField field) { if (nonNull(field) && COSName.SIG.getName().equals(field.getFieldType())) { clipSignature(field.getCOSObject()); return true; } return false; }
SignatureClipper { public static boolean clipSignature(PDField field) { if (nonNull(field) && COSName.SIG.getName().equals(field.getFieldType())) { clipSignature(field.getCOSObject()); return true; } return false; } }
SignatureClipper { public static boolean clipSignature(PDField field) { if (nonNull(field) && COSName.SIG.getName().equals(field.getFieldType())) { clipSignature(field.getCOSObject()); return true; } return false; } private  SignatureClipper(); }
SignatureClipper { public static boolean clipSignature(PDField field) { if (nonNull(field) && COSName.SIG.getName().equals(field.getFieldType())) { clipSignature(field.getCOSObject()); return true; } return false; } private  SignatureClipper(); static void clipSignatures(Collection<PDAnnotation> annotations); static void clipSignatures(PDDocument doc); static boolean clipSignature(PDField field); }
SignatureClipper { public static boolean clipSignature(PDField field) { if (nonNull(field) && COSName.SIG.getName().equals(field.getFieldType())) { clipSignature(field.getCOSObject()); return true; } return false; } private  SignatureClipper(); static void clipSignatures(Collection<PDAnnotation> annotations); static void clipSignatures(PDDocument doc); static boolean clipSignature(PDField field);  }