Hi Stefan, the signature is not shown because you inserted two signatures fields with the same name. If you open the PDF in a text editor you can see:
5 0 obj<</TU(_OPT_Spar)/Type/Annot/F 4/T(_OPT_Spar)/Rect[329 350 527 386]/Subtype/Widget/DA(/Helv 0 Tf 0 g)/FT/Sig>> 6 0 obj<</TU(_OPT_Spar)/Type/Annot/F 4/T(_OPT_Spar)/Rect[271.4 302 469.4 338]/Subtype/Widget/DA(/Helv 0 Tf 0 g)/FT/Sig>> The "/T" stands for title and HAS to be unique. (cp. Adobe PDF Spec). Try to insert just one signature or chose different names and then you can also see the signature in adobe... Regards, an old study colleague of yours :-) Tobias > > > Hi, > > I want to create an empty signature field on an existing pdf with > itext. > I am using the following source, but I have one problem with the > method > setUserName(). > ... > PdfWriter writer = PdfWriter.getInstance(......); > PdfFormField sig = PdfFormField.createSignature(writer); > sig.setWidget(new Rectangle(x1,y1,x2,y2), null); > sig.setFlags(PdfAnnotation.FLAGS_PRINT); > sig.setFieldName("_OPT_Spar"); > sig.put(PdfName.DA, new PdfString("/Helv 0 Tf 0 g")); > //sig.setMappingName("_OPT_Spar"); > sig.setUserName("_OPT_Spar"); > //sig.setName("_OPT_Spar"); > //sig.setTitle("_OPT_Spar"); > writer.addAnnotation(sig); > ... > > see the generated document Test_with_signature.pdf. > > If I use the method sig.setUserName("_OPT_Spar"), the pdf shows the > UserName (tooltip) of the signature field (see > Screenshot_Tooltip_UserName.JPG), but in the signaturesection of Adobe > Reader 8.1.2 there are no signatures available (see > Screenshot_NoSignature.JPG). After sign (by pen pad) the signature is > not > in the pdf and the signature field is locked (see > Test_after_sign.pdf). > There are no problems using the setUserName-method. > > Our pen pad plugin reads the UserName (TU), so we need to set this > value. > > Perhaps, do you have an idea? > > (See attached file: Test_with_signature.pdf)(See attached file: > Screenshot_Tooltip_UserName.JPG)(See attached file: > Screenshot_NoSignature.JPG)(See attached file: Test_after_sign.pdf) > > Mit freundlichen Grüßen / kindest regards > > Stefan Tantow > > FinanzIT GmbH > Entwicklung und Integration A und D > Laatzener Straße 5 > 30539 Hannover > Büro +49 511 5102-22109 > Fax +49 511 5102-1422109 > Notes Stefan [EMAIL PROTECTED] > E-Mail [EMAIL PROTECTED] > Internet www.FinanzIT.com > > FinanzIT GmbH, Laatzener Straße 5, 30539 Hannover > Handelsregister Amtsgericht Hannover HR B 6675 > Vorsitzender des Aufsichtsrates: Claus Friedrich Holtmann > Geschäftsführung: Dr. Thomas Noth (Vorsitzender); Klaus-Peter Kubiak; > Wolfgang Rau; Dr. Peter-Michael Weber; Jörg Wechsler > > Sicherheitshinweis: http://www.FinanzIT.com/sicherheitshinweis Viele Grüße, Tobias Meier __________________________________________________ MSc, Dipl.-Inf. Tobias Meier Softwareentwickler nepatec GmbH & Co. KG Hindenburgstr. 37 . 30175 Hannover Fon +49(0)511 935 946.51, Fax +49(0)511 935 946.57 Mailto:[EMAIL PROTECTED] http://www.nepatec.de ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar