pdftools_toolbox.pdf.forms.field
Classes
|
A form field |
- class pdftools_toolbox.pdf.forms.field.Field(handle)[source]
Bases:
FieldNode
,ABC
A form field
- add_new_widget(bounding_box: Rectangle) Widget [source]
Create a new widget and add to the form field
This method creates a widget for the form field. The widget is automatically added to the field’s widgets, but not to any page. This method does not work for radio button form fields; Use
pdftools_toolbox.pdf.forms.radio_button.RadioButton.add_new_widget()
.- Parameters:
boundingBox (pdftools_toolbox.geometry.real.rectangle.Rectangle) – The widget’s target rectangle on the page
- Returns:
the newly created form field widget
- Return type:
- Raises:
StateError – if the document has already been closed
OperationError – if the document is read-only
OperationError – if the form field is of type
pdftools_toolbox.pdf.forms.radio_button_group.RadioButtonGroup
- property widgets: WidgetList
This form field’s widget annotations
- Returns:
pdftools_toolbox.pdf.forms.widget_list.WidgetList
- Raises:
StateError – if the object has already been closed
- property read_only: bool
Flags this field as read-only
- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property required: bool
Flags this field as mandatory
- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property do_not_export: bool
Tells whether this field is exported
- Returns:
bool
- Raises:
StateError – if the object has already been closed