I am working with: itext-2.1.7 + Java 1.6 + bcmail-jdk14-1.38.jar + bcprov-jdk14-1.38.jar + bctsp-jdk14-1.38.jar The visualization of the pdf i made with DigiSigner Applet (http://www.digisigner.com/)
I use de follow function addSignatureField to create the signature fields. This function add the signature field with color style. But I need also add some kind of title or label indication with the user name of who should sign in this field. How can I add this title over the signature field and when the user sign the pdf the title should disapear?
my function to create signature fields:
public static void addSignatureField(PdfStamper stamper, int page, Rectangle rectangle, String fieldName)
{
//create signature field
PdfFormField signatureField = PdfFormField.createSignature(stamper.getWriter());
signatureField.setPage(page);
signatureField.setWidget(rectangle, null);
signatureField.setFieldName(fieldName);
signatureField.setFlags(PdfAnnotation.FLAGS_PRINT);
// border color
signatureField.setMKBorderColor(Color.BLACK);
// background color
signatureField.setMKBackgroundColor(Color.WHITE);
// add field to document
stamper.addAnnotation(signatureField, page);
}
output image with my actual signature field in the pdf file -> screenshot of my software
Over this signature field should be a text title who say "Sign here, you John Doe!"