pdftools_toolbox.pdf.forms.general_text_field
Classes
|
A general text field |
- class pdftools_toolbox.pdf.forms.general_text_field.GeneralTextField(handle)[source]
Bases:
TextField
A general text field
- static create(target_document: Document) GeneralTextField [source]
Create a general text form field
The returned form field object is not yet used, but it is associated with the given target document.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – the output document with which the returned object is associated
- Returns:
the newly created general text field
- Return type:
pdftools_toolbox.pdf.forms.general_text_field.GeneralTextField
- Raises:
ValueError – if the targetDocument argument has already been closed
ValueError – if the targetDocument argument is read-only
ValueError – the target document contains form fields that have been implicitly copied by a call to
pdftools_toolbox.pdf.page.Page.copy()
with an argument options from pdftools_toolbox.pdf.page.Page.copy in whichpdftools_toolbox.pdf.page_copy_options.PageCopyOptions.form_fields
was set topdftools_toolbox.pdf.forms.form_field_copy_strategy.FormFieldCopyStrategy.COPY
ValueError – the target document contains unsigned signatures that have been implicitly copied by a call to
pdftools_toolbox.pdf.page.Page.copy()
with an argument options from pdftools_toolbox.pdf.page.Page.copy in whichpdftools_toolbox.pdf.page_copy_options.PageCopyOptions.unsigned_signatures
was set topdftools_toolbox.pdf.copy_strategy.CopyStrategy.COPY
.
- property max_length: int | None
The maximal text length
When setting this property to a non-null value, the length of this field’s text is truncated.
- Returns:
Optional[int]
- Raises:
StateError – if the object has already been closed
- property multiline: bool
Flags this text field as multi-line
- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property password: bool
Flags this text field as a password entry field
- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property do_not_spell_check: bool
Flags this text field for prevention from spell checking
- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property do_not_scroll: bool
Flags this text field non scrollable
- Returns:
bool
- Raises:
StateError – if the object has already been closed