addRadioButtonField

public final PdfRadioButtonField addRadioButtonField(String groupName, String optionName, PdfPage page, float x, float y, float width, float height)

Adds a new radio button to an existing or new radio button group on the specified page. Radio buttons are grouped by their group name. Only one radio button in a group can be selected at a time. The returned field represents the radio button group. Individual options are stored as widgets within the group and can be accessed via and related properties.

Return

The representing the radio button group.

Parameters

groupName

The name of the radio button group. All radio buttons with the same group name are mutually exclusive.

optionName

The unique option name for this radio button within the group.

page

The page where the radio button will be placed.

x

The x coordinate of the field's origin in points.

y

The y coordinate of the field's origin in points.

width

The width of the field in points.

height

The height of the field in points.

Throws

Thrown when no document is loaded.

Thrown when the field creation fails.