msinatl,
msinatl wrote: > I've got a problem using iText to digitally sign a PDF. The Groovy script > below works fine with a test PDF I created in Acrobat Pro 7.0. But when I > run it on a PDF produced by my production document system (Oracle > Documaker), I get this exception: > > java.lang.ArrayIndexOutOfBoundsException: 2 > at > com.itextpdf.text.pdf.PdfEncryption.createInfoId(PdfEncryption.java:401) > > I'm using iText 5.0.2, JDK 1.6, and Groovy 1.5.6. At PdfEncryption.java:401 iText creates the literal representation of a document ID from a byte[] representation. iText stumbles as the byte[] parameter is merely 2 bytes long, not 16 as expected. You might want to look at the ID in your source document. (Ok, the code of createInfoId might be made more fool-proof by checking the byte[] parameter, but for valid PDFs the assumptions implicitely made here are correct.) If that ID looks ok in your document, please forward that document (or any other one making that issue reproducible) for inspection. Regards, Michael. -- View this message in context: http://old.nabble.com/ArrayIndexOutOfBoundsException-when-signing-Documaker-PDF-tp28466347p28470201.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/