OpenPDF icon indicating copy to clipboard operation
OpenPDF copied to clipboard

Example code for RadioCheckField

Open asturio opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. We used to use RadioCheckField in 1.3.30 to create Radiogroups and Checkboxes. For that we used: getRadioField() and getCheckField(). These methods do not exist in 1.4 and 2.0 anymore, and the deprecation JavaDoc said use getKidField() and getFullField() respectively.

One of the problems if OpenPDF (since iText 2.1.7) is that the documentation is not really good, and the coverage is low, some changes may break the code more often than desired :-(

Describe the solution you'd like An example of the usage of the actual RadioCheckField would be great. Using:

  • constructor RadioCheckField(PdfWriter, String, String)
  • getKidField()
  • getFullField()
  • getCheckboxParent()

Describe alternatives you've considered Alternatives could be:

  • stick to 1.3
  • use PdfFormField instead like the example in com.lowagie.examples.forms.FormRadioButton

asturio avatar Aug 07 '24 21:08 asturio

@Lonzak Just opened this Issue, but maybe you can take a look at this one?

asturio avatar Aug 07 '24 21:08 asturio

I just got burned by this getKidField() vs getRadioField

melloware avatar Oct 15 '24 17:10 melloware

orphaned issue.

asturio avatar Aug 18 '25 13:08 asturio