Hi all,
 
How can I create an empty (non-signed) signature field using PdfStamper? My intention is to create a document with an empty signature field. The document is not to be signed at this moment. The reason is that I want the users to manually sign them later. So, I want that, when they open the document in acrobat they see the empty field so they can click on it and sign the document.
 
I tried to use:
 
  PdfStamper stamper = PdfStamper.createSignature(documentoPDF, out, '\0');
  // do something
  sap.setVisibleSignature(new Rectangle(100, 300, 60, 60), 1, "empty signature field");
  stamper.close();
 
and
 
  PdfStamper stamper = new PdfStamper(documentoPDF, out);
  // do something
  sap.setVisibleSignature(new Rectangle(100, 300, 60, 60), 1, "empty signature field");
  stamper.close();
 
But in both cases an exception is thrown, respectively:
java.lang.NullPointerException
 at com.lowagie.text.pdf.PdfSignatureAppearance.getAppearance(PdfSignatureAppearance.java:339)
 at com.lowagie.text.pdf.PdfSignatureAppearance.preClose(PdfSignatureAppearance.java :774)
 at com.lowagie.text.pdf.PdfSignatureAppearance.preClose(PdfSignatureAppearance.java:719)
 at com.lowagie.text.pdf.PdfStamper.close(PdfStamper.java:200)
 at br.com.ect.sadel.control.PreparacaoDocumentoControle.processarDocumento (PreparacaoDocumentoControle.java:223)
 
and (in this case, the sap object is null)
 
java.lang.NullPointerException
 at br.com.ect.sadel.control.PreparacaoDocumentoControle.processarDocumento(PreparacaoDocumentoControle.java:209)
 
I'm sending an example PDF file attached (no virus), created in Acrobat Standard 6.0, with an empty signature field. This is exactly what I want to generate, but using iText, not Adobe Standard. First of all, what is this "empty signature field"? Is this a form? What is it from iText point of view?
Second, is it possible to somehow create such an empty (non-signed) signature field with iText?
 
Thank you all in advance.

Filipe Fedalto

Cansado dos disparates e despautérios da República?
Quer um basta nas desventuras de nossos governantes?
Acesse http://www.monarquia.org.br e http://www.brasilimperial.org.br
e saiba mais a respeito.

Attachment: empty_signature_field.pdf
Description: Adobe PDF document

Reply via email to