Represents a push button form field in a PDF document. Push buttons respond immediately to user input without retaining a permanent value. They are typically used to trigger actions like submit, reset, or JavaScript execution.

from nutrient import PdfPushButtonField

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 button.

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 button.

Parameters:

NameTypeDescription
valueColorThe value to set for the BorderColor property.

set_caption

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

Sets the caption text displayed on the button.

Parameters:

NameTypeDescription
valuestrThe value to set for the Caption property.

set_font_color

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

Sets the font color for the button caption text.

Parameters:

NameTypeDescription
valueColorThe value to set for the FontColor property.

set_font_name

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

Sets the font name for the button caption text.

Parameters:

NameTypeDescription
valuestrThe value to set for the FontName property.

set_font_size

def set_font_size(self, value: float) -> None

Sets the font size for the button caption text.

Parameters:

NameTypeDescription
valuefloatThe value to set for the FontSize 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 button.

Type: Color

Read-only property.


border_color

@property
def border_color(self) -> Color

Gets the border color of the button.

Type: Color

Read-only property.


caption

@property
def caption(self) -> str

Gets the caption text displayed on the button.

Type: str

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.


font_color

@property
def font_color(self) -> Color

Gets the font color for the button caption text.

Type: Color

Read-only property.


font_name

@property
def font_name(self) -> str

Gets the font name for the button caption text.

Type: str

Read-only property.


font_size

@property
def font_size(self) -> float

Gets the font size for the button caption text.

Type: float

Read-only property.


full_name

@property
def full_name(self) -> str

Type: str

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.


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.