Uses of Class
com.itextpdf.forms.fields.PdfFormField
-
Uses of PdfFormField in com.itextpdf.forms
Modifier and TypeFieldDescriptionprotected Map<String,
PdfFormField> PdfAcroForm.fields
A map of field names and their associatedform field
objects.Modifier and TypeMethodDescriptionCreates an in-memory copy of aPdfFormField
.Gets aform field
by its name.Modifier and TypeMethodDescriptionPdfAcroForm.getAllFormFields()
Gets allform field
s as aMap
including fields kids.PdfAcroForm.getFieldsForFlattening()
Gets a collection ofform field
s, prepared for flattening usingPdfAcroForm.partialFormFlattening(java.lang.String)
method.PdfAcroForm.getRootFormFields()
Gets root fields (i.e.Modifier and TypeMethodDescriptionvoid
PdfAcroForm.addField
(PdfFormField field) This method adds the field to the last page in the document.void
PdfAcroForm.addField
(PdfFormField field, PdfPage page) This method adds the field to a specific page.void
PdfAcroForm.addField
(PdfFormField field, PdfPage page, boolean throwExceptionOnError) This method adds the field to a specific page.void
PdfAcroForm.addFieldAppearanceToPage
(PdfFormField field, PdfPage page) This method merges field with its annotation and places it on the given page.void
PdfAcroForm.replaceField
(String name, PdfFormField field) Replaces thePdfFormField
of a certain name with anotherPdfFormField
. -
Uses of PdfFormField in com.itextpdf.forms.fields
Modifier and TypeClassDescriptionclass
An interactive control on the screen that raises events and/or can retain data.class
An AcroForm field type representing any type of choice field.class
An AcroForm field containing signature data.class
An AcroForm field containing textual data.Modifier and TypeFieldDescriptionprotected PdfFormField
AbstractPdfFormField.parent
Parent form field.Modifier and TypeMethodDescriptionPdfButtonFormField.addKid
(AbstractPdfFormField kid) Adds a new kid to theKids
array property from aAbstractPdfFormField
.PdfFormField.addKid
(AbstractPdfFormField kid) Adds a new kid to theKids
array property from aAbstractPdfFormField
.PdfFormField.addKid
(AbstractPdfFormField kid, boolean throwExceptionOnError) Adds a new kid to theKids
array property from aAbstractPdfFormField
.PdfFormField.addKid
(PdfWidgetAnnotation kid) Adds a new kid to theKids
array property from aPdfWidgetAnnotation
.static PdfFormField
PdfFormCreator.createFormField
(PdfWidgetAnnotation widget, PdfDocument document) Creates a form field as a parent of aPdfWidgetAnnotation
using provided factory.static PdfFormField
PdfFormCreator.createFormField
(PdfDictionary dictionary) Creates a form field as a wrapper object around aPdfDictionary
using provided factory.static PdfFormField
PdfFormCreator.createFormField
(PdfDocument document) Create a minimal, emptyPdfFormField
using provided factory.PdfFormFactory.createFormField
(PdfWidgetAnnotation widget, PdfDocument document) Creates a form field as a parent of aPdfWidgetAnnotation
.PdfFormFactory.createFormField
(PdfDictionary dictionary) Creates a form field as a wrapper object around aPdfDictionary
.PdfFormFactory.createFormField
(PdfDocument document) Create a minimal, emptyPdfFormField
.NonTerminalFormFieldBuilder.createNonTerminalFormField()
Creates non-terminal form field based on provided parameters.PdfFormField.getChildField
(String fieldName) Gets the child field of form field.AbstractPdfFormField.getParentField()
Gets the parent field.static PdfFormField
PdfFormField.makeFormField
(PdfObject pdfObject, PdfDocument document) Creates a (subtype of)PdfFormField
object.PdfFormField.setAdditionalAction
(PdfName key, PdfAction action) Sets an additional action for the form field.PdfFormField.setAlternativeName
(String name) Changes the alternate name of the field to the specified value.PdfFormField.setCheckType
(CheckBoxType checkType) Changes the type of graphical marker used to mark a checkbox as 'on'.PdfFormField.setDefaultStyle
(PdfString defaultStyleString) Sets a default style string, as described in "Rich Text Strings" section of Pdf spec.PdfFormField.setDefaultValue
(PdfObject value) Sets the default fallback value for the form field.PdfFormField.setFieldFlag
(int flag) Adds a flag, or combination of flags, for the form field.PdfFormField.setFieldFlag
(int flag, boolean value) Adds or removes a flag, or combination of flags, for the form field.PdfFormField.setFieldFlags
(int flags) Sets a flag, or combination of flags, for the form field.PdfFormField.setFieldName
(String name) Changes the name of the field to the specified value.PdfFormField.setJustification
(TextAlignment justification) Sets a code specifying the form of quadding (justification) to be used in displaying the text: 0 Left-justified 1 Centered 2 Right-justifiedPdfFormField.setMappingName
(String name) Changes the mapping name of the field to the specified value.PdfFormField.setNoExport
(boolean noExport) Sets the NoExport flag, specifying whether or not exporting is forbidden.PdfFormField.setOptions
(PdfArray options) Sets options for the form field.PdfFormField.setReadOnly
(boolean readOnly) Sets the ReadOnly flag, specifying whether or not the field can be changed.PdfFormField.setRequired
(boolean required) Sets the Required flag, specifying whether or not the field must be filled in.PdfFormField.setRichText
(PdfObject richText) Sets a rich text string, as described in "Rich Text Strings" section of Pdf spec.Sets a value to the field and generating field appearance if needed.Sets a value to the field (and fields with the same names) and generates field appearance if needed.Set text field value with given font and size.Sets the field value and the display string.Modifier and TypeMethodDescriptionPdfFormField.getAllChildFormFields()
Gets all childFields of this object, including the children of the children but not annotations.PdfFormField.getChildFormFields()
Gets all child form fields of this form field.Modifier and TypeMethodDescriptionstatic void
PdfFormFieldMergeUtil.mergeFormFields
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) This method combines two form fields.static void
PdfFormFieldMergeUtil.mergeKidsWithSameNames
(PdfFormField parentField, boolean throwExceptionOnError) This method merges all kids with the same names for the given parent field dictionary (recursively).static boolean
PdfFormFieldMergeUtil.mergeTwoFieldsWithTheSameNames
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) This method merges different values from two field dictionaries into the first one and combines kids.static void
PdfFormAnnotationUtil.mergeWidgetWithParentField
(PdfFormField field) Merge single widget annotation with its parent field.static void
PdfFormFieldMergeUtil.processDirtyAnnotations
(PdfFormField parentField, boolean throwExceptionOnError) Sometimes widgets contain field related keys, and they are the same as these field keys at parent.static void
PdfFormAnnotationUtil.separateWidgetAndField
(PdfFormField field) Separate merged field to form field and pure widget annotation.void
AbstractPdfFormField.setParent
(PdfFormField parent) Sets a parentPdfFormField
for the current object. -
Uses of PdfFormField in com.itextpdf.forms.fields.merging
Modifier and TypeMethodDescriptionboolean
AddIndexStrategy.execute
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) Renames the second field by adding an index to its name.boolean
AlwaysThrowExceptionStrategy.execute
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) executes the strategy.boolean
MergeFieldsStrategy.execute
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) executes the strategy.boolean
OnDuplicateFormFieldNameStrategy.execute
(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError) executes the strategy.