Represents a check box form field in a PDF document. Check boxes toggle between two states: checked and unchecked.

from nutrient import PdfCheckBoxField

Methods

get_child

def get_child(self, index: int) -> PdfFormField

Parameters:

NameTypeDescription
indexint

Returns: PdfFormField


get_widget

def get_widget(self, index: int) -> PdfWidgetAnnotation

Parameters:

NameTypeDescription
indexint

Returns: PdfWidgetAnnotation


remove_child_at

def remove_child_at(self, index: int) -> None

Parameters:

NameTypeDescription
indexint

set_background_color

def set_background_color(self, value: Color) -> None

Sets the background color of the check box.

Parameters:

NameTypeDescription
valueColorThe value to set for the BackgroundColor property.

set_border_color

def set_border_color(self, value: Color) -> None

Sets the border color of the check box.

Parameters:

NameTypeDescription
valueColorThe value to set for the BorderColor property.

set_is_checked

def set_is_checked(self, value: bool) -> None

Sets whether the check box is currently checked.

Parameters:

NameTypeDescription
valueboolThe value to set for the IsChecked property.

set_is_read_only

def set_is_read_only(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_is_required

def set_is_required(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_value

def set_value(self, value: str) -> None

Parameters:

NameTypeDescription
valuestr

Properties

background_color

@property
def background_color(self) -> Color

Gets the background color of the check box.

Type: Color

Read-only property.


border_color

@property
def border_color(self) -> Color

Gets the border color of the check box.

Type: Color

Read-only property.


child_count

@property
def child_count(self) -> int

Type: int

Read-only property.


default_value

@property
def default_value(self) -> str

Type: str

Read-only property.


field_type

@property
def field_type(self) -> PdfFormFieldType

Type: PdfFormFieldType

Read-only property.


full_name

@property
def full_name(self) -> str

Type: str

Read-only property.


is_checked

@property
def is_checked(self) -> bool

Gets whether the check box is currently checked.

Type: bool

Read-only property.


is_read_only

@property
def is_read_only(self) -> bool

Type: bool

Read-only property.


is_required

@property
def is_required(self) -> bool

Type: bool

Read-only property.


is_terminal

@property
def is_terminal(self) -> bool

Type: bool

Read-only property.


name

@property
def name(self) -> str

Type: str

Read-only property.


on_state_name

@property
def on_state_name(self) -> str

Gets the “on” state name for this check box. This is the value used when the check box is checked (often “Yes” or “On”).

Type: str

Read-only property.


parent

@property
def parent(self) -> PdfFormField

Type: PdfFormField

Read-only property.


value

@property
def value(self) -> str

Type: str

Read-only property.


widget_count

@property
def widget_count(self) -> int

Type: int

Read-only property.