You have to create first the pdf with the blank field, close it, and
than read it with PdfReader as in the examples. It's always a two step
process.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Ismael F
> Sent: Tuesday, February 12, 2008 8:14 AM
> To: Post all your questions about iText here
> Subject: [iText-questions] signing a blank signature field
> previously created as a signature placeholder
>
> Hello,
>
> As I have read in some posts I've created a blank signature
> field called 'keyfield':
>
>
>
> PdfFormField sig = PdfFormField.createSignature(stamper.getWriter());
>
> sig.setWidget(fieldposition, null);
>
> sig.setFlags(PdfAnnotation.FLAGS_PRINT);
>
> sig.put(PdfName.DA, new PdfString("/Helv 0 Tf 0 g"));
>
> sig.setFieldName(keyfield);
>
> sig.setPage(page);
>
> stamper.addAnnotation(sig, page);
>
>
> Then after pdf manipulation and form filling the document
> needs to be automatically signed.
> with iText but I don't know how to achieve this.
>
> It's possible to get the "PdfSignatureAppearance" linked to
> 'keyfield' blank signature field previously created?
>
> As I have read, I know that I will have to do a 'preclose' to
> calculate document size before 'close' SignatureAppearance,
> but I haven't found any constructor like:
>
> PdfSignatureAppearance tSignatureAppearance =
> tStamper.getSignatureAppearance ("keyfield"); // get
> 'keyfield' signature appearance
>
>
> It's necessary to fill the blank signature field just after
> it has been created with
> PdfStamper tStamper =
> PdfStamper.createSignature(tReader,tOutStream,'\0');
>
> as is explained everywhere?
> http://itextpdf.sourceforge.net/howtosign.html
> http://www.mail-archive.com/[EMAIL PROTECTED]
> net/msg34083.html
> http://www.mail-archive.com/[EMAIL PROTECTED]
> net/msg17968.html
> http://answers.suziana.com/2006/12/12/re-computing-the-signatu
> re-size-before-signing-2.html
>
>
> Thanks a lot!
>
> Ismael Fortuny
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/