Eric Lou wrote: > Hi all, > > refer to the book, we can get all possible values for radio button group > with the field name, like: > String[] states = form.getAppearanceStates(acroFieldName); > > and also, we can know the positions for all radio buttons with the field > name, like: > float[] pos= form.getFieldPositions(acroFieldName); > > pos[0]~pos[4] is the 1st radio button, > pos[5]~pos[9] is the 2nd radio button...etc > > but in fact, it seems there are no relationship between the positions > group and the values > that means i can get all the positions and all values for a radio group, > but i cannot know which value is for which position radio button. > and the values and positions might not in the same sequence. > > am I mssing anything? > or i went the wrong way?
getFieldPositions is just a helper method. If you want the full information, use getMerged() as was done in my previous answer. Note that getMerged() is new. In the terminology of the book, you'd need to iterate of item.merged as is done on page 508. The book example is adapted to the newer API here: http://1t3xt.be/?X042 -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ _______________________________________________ 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 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/
