Thank you for help. Br, Paweł Gawędzki
Bruno Lowagie (iText) wrote: > > Gawędzki wrote: >> I do not understand why method getField("fieldname") returns me "yes". > > OK, then that is the difference between the example in the book and your > PDF. Please open your PDF in iText RUPS and select the form tab as I did > in the screenshot I've sent to the mailing list yesterday: > http://www.nabble.com/attachment/17778305/0/radiobuttons.png > Click on the different 'children' of the radiobutton (in my case, there > are three 'unnamed field' entries). > > Have a look on the left panes in the RUPS application. You will see that > the tree view displaying the object hierarchy jumps to the objects that > describe the corresponding field/widget. In the bottom panel on the > left, you will see the keys/values of the corresponding dictionary. > > In attachment you find two details of screenshots: > > * radiobutton1.png shows what I see for the selected radiobutton. > > You can see that this radio button is selected because the Appearance > State /AS refers to the /EN entry in the Appearance dictionary /AP. > The value /V is /EN. Note that this /V entry could also be in the > parent dictionary. In any case: you have the value /yes for the /V > entry somewhere in that three. I know this because that's what getField > returns for you. > > * Now look at the second screenshot radiobutton2.png. > > That's how the radio button for "French" is defined. The value /V is > /Off because the button is not selected. What if we had selected > French instead of English? Then the value would be /FR, because if > you look at the Normal states /N in the /AP dictionary, you can see > that there are two appearance states: /FR and /Off > If the button is selected the appearance state /AS will be /FR and > so will the /V value (of the parent or the kid). > >> Before I started posted this questions I wrote code as you described >> and it gave me only "yes". If everything is ok with pdf, method >> getField() >> should returns me name of the chosen button? Right? > > I fear that your button are defined in a way that they ALL have > the value /On and /Off, instead of /a and /off, /b and /Off,... > You pretended that wasn't the case yesterday, when you claimed: > > "It looks like this: > Radio button named //ProductId > * 'a' on-value, 'off' off-value > * 'b' on-value, 'off' off-value > * 'c' on-value, 'off' off-value > * 'd' on-value, 'off' off-value" > > But how do you know that is the case??? > What is the /V value? Have you checked your PDF. > The reason why your question is frustrating is because it's as > if you are saying "my document is black" and "my document is white" > at the same time. How do you expect us to know what is wrong if you > are giving us contradictory information??? > > By the way: lowagie.com has been offline for hours because of > a problem at my hosting provider. I haven't been able to receive > any mail for almost half a day now. I'm not in a very good mood > for the moment. > > 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 > -- View this message in context: http://www.nabble.com/Radiobuttons-in-iText---tp17773777p17799325.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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