Paulo,

Paulo Soares-3 wrote
> If the SigFlags were present then iText would try harder and find the
> field.

I'm afraid it wouldn't. The part which looks at SigFields is for another
kind of PDFs: PDFs which have the signature fields in
Catalog->AcroForm->Fields but not referenced from any page. The PDF
presented by the OP is the other way around, it has its signature fields
referenced from a page but an empty Catalog->AcroForm->Fields.

In case of the PDF by the OP an early test in AcroFields.fill() finds out
that Catalog->AcroForm->Fields is empty and, thus, stops searching for any
fields at all.

> There's not much to work with with such PDF.

I wouldn't be surprised if simply moving the Catalog->AcroForm and
Catalog->AcroForm->Fields checks down to just before the SigFlags check did
the trick. But this would mean that fill() would search page after page of
each and every PDF file for which an AcroFields instance is generated even
if those documents by absence of an Acroform dictionary or an empty Fields
array declared that there are no fields.

If that worked, a compromise might be to merely move the
Catalog->AcroForm->Fields check down: One might interpret the presence of
Catalog->AcroForm to be a good enough hint that the PDF creator at least
considered adding form fields even if he put no entries into
Catalog->AcroForm->Fields.

Regards,   Michael

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/No-entries-in-AcroFields-PdfArray-but-Acrobat-shows-fields-tp4146806p4147620.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to