pdftools_toolbox.pdf.forms.sub_form

Classes

SubForm(handle)

A form field that contains other fields

class pdftools_toolbox.pdf.forms.sub_form.SubForm(handle)[source]

Bases: FieldNode

A form field that contains other fields

static create(target_document: Document) SubForm[source]

Create a sub form

The returned sub form 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 sub form

Return type:

pdftools_toolbox.pdf.forms.sub_form.SubForm

Raises:
property children: FieldNodeMap

The child form fields

Adding to this list results in an error:

  • IllegalState if the list has already been closed

  • UnsupportedOperation if the document is read-only

  • IllegalArgument - if the given form field node is None - if the given form field node has already been closed - if the given form field node does not belong to the same document as the list - if the given form field node has already been added to a form field node list - if the given form field node’s identifier equals an identifier of one of the form field nodes in this list

This list does not support removing or setting elements or clearing.

Returns:

pdftools_toolbox.pdf.forms.field_node_map.FieldNodeMap

Raises:

StateError – if the object has already been closed