Hello,
I want to know how I can get all objects checkbox / radio buttons that are
in a group. In my code I can only get the group and not the individual
objects. I'm using itext 5.3.1 and java 6.
AcroFields fields = stamper.getAcroFields();
Map map = <String,AcroFields.Item> fields.getFields ();
ArrayList <String> itemsNamesPdf <String> = new ArrayList ();
ArrayList <String> itemsValuesPdf <String> = new ArrayList ();
for (int i = 0; i < map.size (); i + +) {
String itemName = (String) map.keySet().ToArray()[i];
itemsNamesPdf.add(itemName);
}
for (int j = 0 j <itemsNamesPdf.size (); j + +) {
itemsValuesPdf.add(fields.getField(itemsNamesPdf.get(j)));
}
this.fieldsString = "";
for (int k = 0 k < itemsNamesPdf.size () k + +) {
this.fieldsString + = this.fieldsString itemsNamesPdf.get(k) + "|" +
itemsValuesPdf.get(k) + ";"
}
System.out.println (fieldsString);
-----------------------
Output:
CheckBox Group1|Off;
P1_DD1|TESTE1;
P1_LT1|TESTE3;
P1_TF1|texto_text_field;
Radio Button Group1|P1_RB1;
P1_BT1|;
CheckBox Group2|Off;
------------------------
Ao inves de mostrar o grupo, gostaria de conseguir acessar os objetos de
checkbox/radio buttons.
thanks in advance.
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/how-to-get-all-checkboxes-radio-buttons-that-are-within-a-group-tp4656131.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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