precyz wrote: > I have radiobutton named "nameRadiobutton". It has four buttons: a, b, c, d. > Button c is in state "on" (it means the rest are in state "off"). > How in iText can I check which button (a, b, c or d) is in state "on" ? > > I know how to get names of this four buttons: > > PdfReader reader = new PdfReader("input_file.pdf"); > AcroFields form = reader.getAcroFields(); > String states[] = form.getAppearanceStates("nameRadiobutton"); > for (int i = 0; i < states.length; i++) > System.out.println(states[i]); > > but I do not know which one is in state "on" ! > Could somebody help me ?
Wait a minute! Are you saying that you have 4 buttons of which the 'ON' state value of each of those buttons is "on"? If that is the case, you are completely misunderstanding the concept of radio buttons. Imagine you have to submit such a form to a server, then the server would always receive "nameRadiobutton=on" no matter which radio button is selected. That's not an invalid form, but it doesn't make sense either. If that is the case, you should change your form. br, Bruno ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar