Thanks,
I understood that, and I do it in two step process (opening and closing the
document in every step):
1) First form field creation included blank signature field (witn name
"keyfield" ).
opening and closing the document in this step.
2) Form filling and Signing ("keyfield" blank signature previouly created )
opening and closing the document in this step.
but it is in this second step where I don't know how to reference the
corresponding PdfSignatureAppearance from "keyfield" signature to make the
automatic external signing
like:
PdfSignatureAppearance sap = stp.getSignatureAppearance();sap.setCrypto(key,
chain, null, PdfSignatureAppearance.WINCER_SIGNED);sap.setReason("I'm the
author");sap.setLocation("Lisbon");// comment next line to have an invisible
signaturesap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1,
null);stp.close();
because I could not find at iText API any method that returns
PdfSignatureAppearance corresponding to a specific signature field (in this
case was "keyfield").
the line
PdfSignatureAppearance sap = stp.getSignatureAppearance();
works with the signature field just created with
PdfStamper tStamper = PdfStamper.createSignature(tReader,tOutStream,'\0');
but that was what I made in the first step to create the corresponding blank
signature field.
It's possible to create the blank signature field and signing it in two process
step?
Thanks again.
> Date: Tue, 12 Feb 2008 10:36:07 +0000> From: [EMAIL PROTECTED]> To:
> [email protected]> Subject: Re: [iText-questions] signing
> a blank signature field previously created as a signature placeholder> > 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.> > >
_________________________________________________________________
MSN Noticias
http://noticias.msn.es/comunidad.aspx-------------------------------------------------------------------------
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/