I think he is referring to the /DA key. In any case choking with that in a signature is ridiculous.
Paulo > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Leonard Rosenthol > Sent: Thursday, April 19, 2007 3:29 PM > To: Post all your questions about iText here > Subject: Re: [iText-questions] pdf signatures not standard conform? > > Caberet is incorrect or standard PDF. Standard PDF does NOT > require > an appearance for signature fields - in fact, Adobe Acrobat < 8 > didn't bother to put one in for invisible signatures. > > HOWEVER, for PDF/A compliance all signatures DO require an > appearance. But AFAIK, you aren't doing PDF/A - are you? > > Leonard > Adobe Systems > > On Apr 19, 2007, at 10:22 AM, Armin Häberling wrote: > > > Hi, > > > > We tried to validate our PDFs signed with itext with Cabaret Stage > > 3.0 (see http://www.cabaret-solutions.com/de/products/stage/). The > > program contains a "Document Report" function, which failed > for our > > signed pdf. > > So we contacted the developers from Cabaret. > > This was their answer: > > > >> The signature was not created in conformance to the PDF > >> specification and thus leads to an Exception in CABAReT > Stage. The > >> problem is > >> the missing "Default Appearance" in the signature annotation. > >> Following the PDF > >> spec a signature field has to have a default appearance, even if > >> the appearance > >> is only 0 x 0 in dimension. > >> CABAReT Solutions will prepare a fix for this situation, i.e. the > >> missing > >> appearance will not lead to an error anymore. > >> Nevertheless, the software used by the customer for signing the > >> PDF and > >> integration the signature should obey the PDF spec. > > > > So could it be that the signatures generated with itext do not > > fully confirm with the PDF standard? > > > > > > I attached a pdf that generated the error in cabaret > > It was created using the foloowing code, which was taken from > > http://itextpdf.sourceforge.net/howtosign.html#keysself > > > > > > KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); > > ks.load(new FileInputStream("keystore.ks"), "123456".toCharArray()); > > String alias = (String) ks.aliases().nextElement(); > > PrivateKey key = (PrivateKey) ks.getKey(alias, "123456".toCharArray > > ()); > > Certificate[] chain = ks.getCertificateChain(alias); > > PdfReader reader = new PdfReader("original.pdf"); > > FileOutputStream fout = new FileOutputStream("signed.pdf"); > > PdfStamper stp = PdfStamper.createSignature(reader, fout, '\0'); > > PdfSignatureAppearance sap = stp.getSignatureAppearance(); > > sap.setCrypto(key, chain, null, PdfSignatureAppearance.SELF_SIGNED); > > sap.setReason("I'm the author"); > > sap.setLocation("Lisbon"); > > // comment next line to have an invisible signature > > sap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1, null); > > stp.close(); > > > > > > Regrads, > > > > Armin > > > > <signed.pdf> 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 DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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/
