pdftools_toolbox.pdf.forms.field_node
Classes
|
Base class for form fields and sub forms |
- class pdftools_toolbox.pdf.forms.field_node.FieldNode(handle)[source]
Bases:
_NativeObject
,ABC
Base class for form fields and sub forms
- static copy(target_document: Document, field_node: FieldNode) FieldNode [source]
Copy a form field node
Copy a form field node object from an input document to the given targetDocument. The returned object is associated with the given target document but not yet part of it.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – the output document with which the returned object is associated
fieldNode (pdftools_toolbox.pdf.forms.field_node.FieldNode) – a form field of a different document
- Returns:
the copied form field, associated with the current document
- Return type:
- Raises:
OSError – Error reading from the source document or writing to the target document
pdftools_toolbox.conformance_error.ConformanceError – The conformance level of the source document is not compatible with the conformance level of the target document.
ValueError – if the targetDocument argument has already been closed
ValueError – if the targetDocument argument is read-only
ValueError – the fieldNode object is not associated with an input document
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
.ValueError – the document associated with the fieldNode object has been closed
- property display_name: str | None
User interface name
The display name is not directly visible, but a PDF viewer can display this name, e.g., in a tool tip.
- Returns:
Optional[str]
- Raises:
StateError – if the object has already been closed
- property export_name: str | None
The name used when exporting
- Returns:
Optional[str]
- Raises:
StateError – if the object has already been closed