Oscar, if I read your code correctly, you try and extract revisions using "af.extractRevision(name)" where name is a signature name. Therefore the revision you extract is the revision that the named signature refers to and that therefore contains that signature. the revision you want, though, is the revision before, most likely not refered to by a signature name. Thus, you very likely have to extract that prior revision differently.
I don't think iText already has a method for that. I'm not sure, though, I'm typing this on my mobile phone… OscarP wrote: > > OK, I'm attaching a signed PDF and the code I'm using to obtain the > revision. But the first revision obtained with this code contains the > signature field. How can I obtain a revision without the signature field? > > the code: > byte bb[] = new byte[8192]; > PdfReader reader; > reader = new PdfReader(entrada); > AcroFields af = null; > ArrayList names = null; > af = reader.getAcroFields(); > names = af.getSignatureNames(); > for (int k = 0; k < names.size(); ++k) { > String name = (String)names.get(k); > if (af.getRevision(name)==numRevision){ > InputStream ip = af.extractRevision(name); > int n = 0; > while ((n = ip.read(bb)) > 0) > out.write(bb,0,n); > ip.close(); > out.close(); > return; > } > } > } > > > Thanks for all. > > http://www.nabble.com/file/p23649098/firmado2vecesOk.pdf > firmado2vecesOk.pdf > > Regards, Michael. -- View this message in context: http://www.nabble.com/Signature-PDF.-How-obtain-Original-PDF-tp23620527p23649480.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/