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>
> ---------------------------------------------------------------------- 
> ---
> 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/


-------------------------------------------------------------------------
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/

Reply via email to