Paulo, but to find those orphan signature fields I do have to loop through all of them, don't I? And furthermore, why shouldn't there be other kinds of fields without a visual representation?
My main question, though, still is whether iText somehow hickups when the AcroFields fields member is enhanced like this, especially considering PdfStamper and PdfCopy* using AcroFields when generating new PDFs. Michael. -----Ursprüngliche Nachricht----- Von: Paulo Soares [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 7. November 2008 19:47 An: Post all your questions about iText here Betreff: Re: [iText-questions] Signature not found : Bug or feature ? It may not be needed to loop through all the fields. This situation can only occur if the sigflags are set and there's an orphan signature field with a rectangle [0 0 0 0]. Paulo ________________________________________ From: Michael Klink [EMAIL PROTECTED] Sent: Friday, November 07, 2008 3:08 PM To: [email protected] Subject: Re: [iText-questions] Signature not found : Bug or feature ? Hello, I happened to come across signatures just like the one Andreas Kühne posted in September. As I need to be able to handle these signatures fairly soon (at least it looks like a greater hassle to persuade my users not to use the secunet application that creates these signatures), I created a small helper method that adds these signature fields not referenced in the annotation arrays of the document pages; this helper has to be applied to an AcroFields instance right after getting it from the PdfReader. Essentially it replaces the data collected by AcroFields.fill() with an extended set of fields in a way inspired by the that very method. It seems to work alright in my first tests, even though there might be some object releasing still to do; and obviously the duplicate code inside that method is not artful coding. Primarily I do wonder, though, whether iText might have any trouble when later confronted with these additional entries among its fields, especially considering the PdfStamper and PdfCopy* classes when writing derived PDF documents. Regards, Michael. Paulo Soares <psoares <at> glintt.com> writes: > I'm not sure if this is a bug from iText but this things appear now and then > and, > like it or not, if it works in Acrobat it must be right. I'll "fix" it. > > Paulo > > > -----Original Message----- > > From: itext-questions-bounces <at> lists.sourceforge.net > > [mailto:itext-questions-bounces <at> lists.sourceforge.net] On > > Behalf Of Andreas Kuehne > > Sent: Tuesday, September 09, 2008 4:08 PM > > To: Post all your questions about iText here > > Subject: [iText-questions] Signature not found : Bug or feature ? > > > > Hi, > > > > I'm not sure whether I'm going to submit a bug or request a > > new feature : > > > > The AcroFields class has method returning all signatures ( > > getSignatureNames() ). > > > > Now I came across a pdf with a signature that doesn't get > > returned by getSignatureNames(). On the other hand the > > Acrobat Reader shows the signature without any problems. > > > > Analyzing the code shows that AcroFields are expected to be > > related to a page. But the signature doesn't ! > > So my question is : > > > > Is it a bug to expect every signature to be assigned to a > > page ( what isn't neccessarily so ) ? > > Or do AcroFields are expected to be page-related 'by nature', > > so my signature is just no AcroField and I must look for > > another way to retrieve the signature ? > > > > The problematic signed PDF is attached. > > > > Opinions welcome > > > > Andreas -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
