AddRadioButtons(String, IEnumerable, PdfFieldOptions?) Method

Definition

Namespace Broadside.Forms
Assembly Broadside.dll

Creates a radio button field with one widget per button, none selected.

public PdfRadioButtonField AddRadioButtons(string name, IEnumerable<PdfRadioButton> buttons, PdfFieldOptions? options = null)

Parameters

name
String

The field's fully qualified name, as for AddTextField(String, PdfPage, PdfRectangle, PdfFieldOptions?).

buttons
IEnumerable<PdfRadioButton>

The buttons, at least one: each widget's page, rectangle and on state.

options
PdfFieldOptions

The field's flags (NoToggleToOff, RadiosInUnison), dot colour and size, widget colours and caption; null for the defaults.

Returns

PdfRadioButtonField
The new field; select a button with SetValue(CosName) or Select(PdfWidgetAnnotation).

Remarks

ISO 32000-2 §12.7.5.2.4. A button field with the Radio flag whose Kids are the widgets (each with Parent), each with an appearance subdictionary for its on state (a dot in ZapfDingbats, or the caption character) and Off, AS Off. RadiosInUnison needs PDF 1.5. Otherwise as AddTextField(String, PdfPage, PdfRectangle, PdfFieldOptions?) describes.