Package com.ironsoftware.ironpdf.form
Class FormManager
java.lang.Object
com.ironsoftware.ironpdf.form.FormManager
Class used to read and write data to AcroForms in a
PdfDocument
.
-
Constructor Summary
ConstructorDescriptionFormManager
(InternalPdfDocument internalPdfDocument) Please get FormManager byPdfDocument.getForm()
instead. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
flatten()
Flattens a document (make all form fields non-editable).final void
flatten
(PageSelection pageSelection) Flattens a document (make all form fields non-editable).Get a collection of the user-editable form fields within a PDF documentvoid
renameField
(String currentFieldName, String newFieldName) Rename aFormField
void
setFieldValue
(String fieldName, String value) Set the string value of aFormField
void
setTextFieldFont
(String textFieldName, FontTypes font, int fontSize) Set the font of aTextField
-
Constructor Details
-
FormManager
Please get FormManager byPdfDocument.getForm()
instead.- Parameters:
internalPdfDocument
- the internal pdf document
-
-
Method Details
-
flatten
public final void flatten()Flattens a document (make all form fields non-editable). -
flatten
Flattens a document (make all form fields non-editable).- Parameters:
pageSelection
- Selected page indexes. Default is all pages.
-
getFields
Get a collection of the user-editable form fields within a PDF document -
renameField
Rename aFormField
- Parameters:
currentFieldName
- Current fully qualified field namenewFieldName
- New partial field name Please use a fully qualified field name for CurrentFieldName, and a partial field name for NewFieldName
-
setFieldValue
Set the string value of aFormField
- Parameters:
fieldName
- Fully qualified field namevalue
- New value
-
setTextFieldFont
Set the font of aTextField
- Parameters:
textFieldName
- Fully qualified field namefont
- New fontfontSize
- New font size
-