This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/editors/pdf/formfields/pdf-list-box-field.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PdfListBoxField

Represents a list box form field in a PDF document. List boxes display a scrollable list of options for selection.

from nutrient_sdk import PdfListBoxField

Inherits from: PdfFormField

Construction

PdfListBoxField cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

Methods

add_item

def add_item(self, text: str) -> None
def add_item(self, text: str, value: str) -> None

Adds an item to the list box.

Parameters:

NameTypeDescription
textstrThe display text for the item.
value (optional)strThe export value for the item.

Raises:


remove_item_at

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

Removes an item from the list box at the specified index.

Parameters:

NameTypeDescription
indexintThe 0-based index of the item to remove.

Raises:


Properties

has_selection

@property
def has_selection(self) -> bool

Whether the list box has a value selected.

Type: bool

Read-only property.


item_count

@property
def item_count(self) -> int

The number of items in the list box.

Type: int

Read-only property.


selected_value

@property
def selected_value(self) -> str
@selected_value.setter
def selected_value(self, value: str) -> None

The currently selected value. For multi-select list boxes, this returns the first selected value.

Type: str


Inherited members

From PdfFormField: child, child_count, default_value, field_type, full_name, is_read_only, is_required, is_terminal, name, parent, value, widget, widget_count, remove_child_at