Class FieldNode

  • Direct Known Subclasses:
    Field, SubForm

    public abstract class FieldNode
    extends NativeObject

    Base class for form fields and sub forms

    • Method Detail

      • copy

        public static FieldNode copy​(Document targetDocument,
                                     FieldNode fieldNode)
                              throws java.io.IOException,
                                     ConformanceException

        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 - the output document with which the returned object is associated
        fieldNode - a form field of a different document
        Returns:
        the copied form field, associated with the current document
        Throws:
        java.io.IOException - Error reading from the source document or writing to the target document
        ConformanceException - The conformance level of the source document is not compatible with the conformance level of the target document.
        java.lang.IllegalArgumentException - if the targetDocument argument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument argument is read-only
        java.lang.IllegalArgumentException - the fieldNode object is not associated with an input document
        java.lang.IllegalArgumentException - the target document contains form fields that have been implicitly copied by a call to toolbox.pdf.Page.copy with an argument options in which toolbox.pdf.PageCopyOptions.setFormFields was set to FormFieldCopyStrategy.COPY
        java.lang.IllegalArgumentException - the target document contains unsigned signatures that have been implicitly copied by a call to toolbox.pdf.Page.copy with an argument options in which toolbox.pdf.PageCopyOptions.setUnsignedSignatures was set to toolbox.pdf.CopyStrategy.COPY.
        java.lang.IllegalArgumentException - the document associated with the fieldNode object has been closed
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if fieldNode is null
      • getDisplayName

        public java.lang.String getDisplayName()

        User interface name (Getter)

        The display name is not directly visible, but a PDF viewer can display this name, e.g., in a tool tip.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setDisplayName

        public void setDisplayName​(java.lang.String value)

        User interface name (Setter)

        The display name is not directly visible, but a PDF viewer can display this name, e.g., in a tool tip.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only
      • getExportName

        public java.lang.String getExportName()

        The name used when exporting (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setExportName

        public void setExportName​(java.lang.String value)

        The name used when exporting (Setter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only