Class Form_Api
- java.lang.Object
-
- com.ironsoftware.ironpdf.internal.staticapi.Form_Api
-
public final class Form_Api extends Object
The type Form api.
-
-
Constructor Summary
Constructors Constructor Description Form_Api()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
flattenPdfFrom(InternalPdfDocument internalPdfDocument)
Flattens a document (make the fields non-editable).static void
flattenPdfFrom(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes)
Flattens a document (make the fields non-editable).static List<FormField>
getFields(InternalPdfDocument internalPdfDocument)
Get a collection of the user-editable form fields within a PDF documentstatic String
renameField(InternalPdfDocument internalPdfDocument, String currentFieldName, String newFieldName)
Rename aFormField
static void
setFieldValue(InternalPdfDocument internalPdfDocument, int annotationIndex, String value)
Set the value of aFormField
static void
setFormFieldIsReadOnly(InternalPdfDocument internalPdfDocument, int annotationIndex, boolean isReadOnly)
Sets text field font.static void
setTextFieldFont(InternalPdfDocument internalPdfDocument, String textFieldName, FontTypes font, int fontSize)
Sets text field font.
-
-
-
Method Detail
-
getFields
public static List<FormField> getFields(InternalPdfDocument internalPdfDocument)
Get a collection of the user-editable form fields within a PDF document- Parameters:
internalPdfDocument
- the internal pdf document- Returns:
- the fields
-
renameField
public static String renameField(InternalPdfDocument internalPdfDocument, String currentFieldName, String newFieldName)
Rename aFormField
- Parameters:
internalPdfDocument
- the internal pdf documentcurrentFieldName
- 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- Returns:
- newFieldName;
-
setFieldValue
public static void setFieldValue(InternalPdfDocument internalPdfDocument, int annotationIndex, String value)
Set the value of aFormField
- Parameters:
internalPdfDocument
- the internal pdf documentannotationIndex
- fully qualified field annotationIndexvalue
- new value
-
setTextFieldFont
public static void setTextFieldFont(InternalPdfDocument internalPdfDocument, String textFieldName, FontTypes font, int fontSize)
Sets text field font.- Parameters:
internalPdfDocument
- the internal pdf documenttextFieldName
- the text field namefont
- the fontfontSize
- the font size
-
flattenPdfFrom
public static void flattenPdfFrom(InternalPdfDocument internalPdfDocument)
Flattens a document (make the fields non-editable).- Parameters:
internalPdfDocument
- the internal pdf document
-
flattenPdfFrom
public static void flattenPdfFrom(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes)
Flattens a document (make the fields non-editable).- Parameters:
internalPdfDocument
- the internal pdf documentpageIndexes
- page indexes to flatten (defaults to all pages)
-
setFormFieldIsReadOnly
public static void setFormFieldIsReadOnly(InternalPdfDocument internalPdfDocument, int annotationIndex, boolean isReadOnly)
Sets text field font.- Parameters:
internalPdfDocument
- the internal pdf documentannotationIndex
- the form field annotation IndexisReadOnly
- the read only value
-
-