TvT, Thomas,

TvT wrote
> for checkboxes and radiobuttons iText only considers the /V (value key):
> String value = acroFields.getField(fieldName);
> 
> You only see /OFF thus the /V attribute is probably missing in your PDF
> since many PDF Tools/Viewers do not set the value for
> checkboxes/radiobuttons.
> According to the PDF spec the /AS key should contain the correct state.

It's even worse in Thomas' PDF, The field in question has a /V value /Off
and and an /AS appearance state /chk2. Each of these attributes is specified
to select the applicable/appropriate appearance stream from an appearance
subdictionary.

Thus, this PDF is internally inconsistent and the appearance you are shown
is totally up to the PDF viewer you use.

Regards,   Michael

PS: Additionally the parent field also has a /V value, /chk2 in this case.
But parent attributes only serve as defaults if the child does not have that
attribute.



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/check-if-a-checkbox-is-selected-tp4660724p4660736.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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