pdftools_toolbox.pdf.forms.sub_form
Classes
|
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:
- 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 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