PdfTextField
Represents a text form field in a PDF document. Text fields allow users to enter text from the keyboard.
from nutrient import PdfTextFieldMethods
get_child
def get_child(self, index: int) -> PdfFormFieldParameters:
| Name | Type | Description |
|---|---|---|
index | int |
Returns: PdfFormField
get_widget
def get_widget(self, index: int) -> PdfWidgetAnnotationParameters:
| Name | Type | Description |
|---|---|---|
index | int |
Returns: PdfWidgetAnnotation
remove_child_at
def remove_child_at(self, index: int) -> NoneParameters:
| Name | Type | Description |
|---|---|---|
index | int |
set_background_color
def set_background_color(self, value: Color) -> NoneSets the background color of the text field.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Color | The value to set for the BackgroundColor property. |
set_border_color
def set_border_color(self, value: Color) -> NoneSets the border color of the text field.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Color | The value to set for the BorderColor property. |
set_font_color
def set_font_color(self, value: Color) -> NoneSets the font color for the text field content.
Parameters:
| Name | Type | Description |
|---|---|---|
value | Color | The value to set for the FontColor property. |
set_font_name
def set_font_name(self, value: str) -> NoneSets the font name for the text field content.
Parameters:
| Name | Type | Description |
|---|---|---|
value | str | The value to set for the FontName property. |
set_font_size
def set_font_size(self, value: float) -> NoneSets the font size for the text field content.
Parameters:
| Name | Type | Description |
|---|---|---|
value | float | The value to set for the FontSize property. |
set_is_read_only
def set_is_read_only(self, value: bool) -> NoneParameters:
| Name | Type | Description |
|---|---|---|
value | bool |
set_is_required
def set_is_required(self, value: bool) -> NoneParameters:
| Name | Type | Description |
|---|---|---|
value | bool |
set_text
def set_text(self, value: str) -> NoneSets the text content of the field. This is an alias for the property.
Parameters:
| Name | Type | Description |
|---|---|---|
value | str | The value to set for the Text property. |
set_value
def set_value(self, value: str) -> NoneParameters:
| Name | Type | Description |
|---|---|---|
value | str |
Properties
background_color
@propertydef background_color(self) -> ColorGets the background color of the text field.
Type: Color
Read-only property.
border_color
@propertydef border_color(self) -> ColorGets the border color of the text field.
Type: Color
Read-only property.
child_count
@propertydef child_count(self) -> intType: int
Read-only property.
default_value
@propertydef default_value(self) -> strType: str
Read-only property.
field_type
@propertydef field_type(self) -> PdfFormFieldTypeType: PdfFormFieldType
Read-only property.
font_color
@propertydef font_color(self) -> ColorGets the font color for the text field content.
Type: Color
Read-only property.
font_name
@propertydef font_name(self) -> strGets the font name for the text field content.
Type: str
Read-only property.
font_size
@propertydef font_size(self) -> floatGets the font size for the text field content.
Type: float
Read-only property.
full_name
@propertydef full_name(self) -> strType: str
Read-only property.
is_read_only
@propertydef is_read_only(self) -> boolType: bool
Read-only property.
is_required
@propertydef is_required(self) -> boolType: bool
Read-only property.
is_terminal
@propertydef is_terminal(self) -> boolType: bool
Read-only property.
name
@propertydef name(self) -> strType: str
Read-only property.
parent
@propertydef parent(self) -> PdfFormFieldType: PdfFormField
Read-only property.
text
@propertydef text(self) -> strGets the text content of the field. This is an alias for the property.
Type: str
Read-only property.
value
@propertydef value(self) -> strType: str
Read-only property.
widget_count
@propertydef widget_count(self) -> intType: int
Read-only property.