pdftools_toolbox.pdf.forms.choice_field

Classes

ChoiceField(handle)

A choice field

class pdftools_toolbox.pdf.forms.choice_field.ChoiceField(handle)[source]

Bases: Field, ABC

A choice field

add_new_item(display_name: str | None) ChoiceItem[source]

Creates a new choice item. The item is automatically added to the choice field’s pdftools_toolbox.pdf.forms.choice_field.ChoiceField.items .

Parameters:

displayName (Optional[str]) – this item’s display name

Returns:

the newly created choice item

Return type:

pdftools_toolbox.pdf.forms.choice_item.ChoiceItem

Raises:
property items: ChoiceItemList

The list of choice items

Adding or removing items or clearing the list is not supported.

Returns:

pdftools_toolbox.pdf.forms.choice_item_list.ChoiceItemList

Raises:

StateError – if the object has already been closed