Class FormManager

    • Constructor Detail

    • Method Detail

      • flatten

        public final void flatten()
        Flattens a document (make all form fields non-editable).
      • flatten

        public final void flatten​(PageSelection pageSelection)
        Flattens a document (make all form fields non-editable).
        Parameters:
        pageSelection - Selected page indexes. Default is all pages.
      • getFields

        public FormFieldsSet getFields()
        Get a collection of the user-editable form fields within a PDF document
        Returns:
        FormFieldsSet
      • renameField

        public String renameField​(String currentFieldName,
                                  String newFieldName)
        Rename a FormField
        Parameters:
        currentFieldName - Current fully qualified field name
        newFieldName - New partial field name Please use a fully qualified field name for CurrentFieldName, and a partial field name for NewFieldName
        Returns:
        New fully-qualified field name
      • setFieldValue

        public void setFieldValue​(String fieldName,
                                  String value)
        Set the string value of a FormField
        Parameters:
        fieldName - Fully qualified field name
        value - New value
      • setFieldReadOnly

        public void setFieldReadOnly​(String fieldName,
                                     boolean value)
        Set the is read only value of a FormField
        Parameters:
        fieldName - Fully qualified field name
        value - is read only
      • setTextFieldFont

        public void setTextFieldFont​(String textFieldName,
                                     FontTypes font,
                                     int fontSize)
        Set the font of a TextField
        Parameters:
        textFieldName - Fully qualified field name
        font - New font
        fontSize - New font size