Hello,
I need to add two signature-fields and add a signature inside the first one.
This is how i do it:
......
......
//Lets create the two fields
PdfFormField sign1 = PdfFormField.createSignature(
pdfStamper.getWriter());
sign1.setWidget(new Rectangle(100, 600, 180, 640), null);
sign1.setFlags(PdfAnnotation.FLAGS_PRINT);
sign1.setFieldName("sign1");
sign1.setPage(1);
pdfStamper.addAnnotation(sign1, 1);
PdfFormField sign2 = PdfFormField.createSignature(
pdfStamper.getWriter());
sign2.setWidget(new Rectangle(200, 600, 280, 640), null);
sign2.setFlags(PdfAnnotation.FLAGS_PRINT);
sign2.setFieldName("sign2");
sign2.setPage(1);
pdfStamper.addAnnotation(sign2, 1);
......
......
//Creating the signature for the first field
PdfSignatureAppearanceOSP signApp;
signApp = pdfStamper.getSignatureAppearance();
signApp.setCrypto(null, certChain, null,
PdfSignatureAppearance.WINCER_SIGNED);
signApp.setReason("Author");
signApp.setCertified(2);
signApp.setVisibleSignature("sign1");
......
......
Unfortunately on the last line (signApp.setVisibleSignature("sign1");) i get
the error: The field sign1 does not exist.
Why? What am i doing wrong?
Thank you,
Luca
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/