pdftools_toolbox.pdf.forms.check_box

Classes

CheckBox(handle)

A check box field

class pdftools_toolbox.pdf.forms.check_box.CheckBox(handle)[source]

Bases: Field

A check box field

static create(target_document: Document) CheckBox[source]

Create a check box 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 check box field

Return type:

pdftools_toolbox.pdf.forms.check_box.CheckBox

Raises:
property checked_export_name: str | None

The name of the checked (‘on’) state used when exporting

Returns:

Optional[str]

Raises:

StateError – if the object has already been closed

property checked: bool

The state of the check box

Returns:

bool

Raises:

StateError – if the object has already been closed