pdftools_toolbox.pdf.forms.general_text_field

Classes

GeneralTextField(handle)

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:
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