org.icepdf.core.pobjects.acroform
Class FieldDictionary

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.acroform.FieldDictionary

public class FieldDictionary
extends Dictionary

Each field in a document’s interactive form shall be defined by a field dictionary, which shall be an indirect object. The field dictionaries may be organized hierarchically into one or more tree structures. Many field attributes are inheritable, meaning that if they are not explicitly specified for a given field, their values are taken from those of its parent in the field hierarchy. Such inheritable attributes shall be designated as such in the Tables 220 and 221. The designation (Required; inheritable) means that an attribute shall be defined for every field, whether explicitly in its own field dictionary or by inheritance from an ancestor in the hierarchy. Table 220 shows those entries that are common to all field dictionaries, regardless of type. Entries that pertain only to a particular type of field are described in the relevant sub-clauses in Table 220.

Since:
5.0

Field Summary
static Name AA_KEY
          (Optional; PDF 1.2) An additional-actions dictionary defining the field’s behaviour in response to various trigger events (see 12.6.3, “Trigger Eventsâ€?).
protected  java.lang.String alternativeFieldName
           
static Name DV_KEY
          (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Actionâ€?).
protected  java.lang.String exportMappingName
           
static Name Ff_KEY
          (Optional; inheritable) A set of flags specifying various characteristics of the field (see Table 221).
protected  Name fieldType
           
protected  java.lang.String fieldValue
           
protected  int flags
           
static Name FT_KEY
          Required for terminal fields; inheritable) The type of field that this dictionary describes:

Btn -> Button (see 12.7.4.2, “Button Fields�)

Tx -> Text (see 12.7.4.3, “Text Fields�)

Ch -> Choice (see 12.7.4.4, “Choice Fields�)

Sig(PDF 1.3) -> Signature (see 12.7.4.5, “Signature Fields�)

This entry may be present in a non-terminal field (one whose descendants are fields) to provide an inheritable FT value.

static Name KIDS_KEY
          (Sometimes required, as described below) An array of indirect references to the immediate children of this field.
static Name PARENT_KEY
          (Required if this field is the child of another in the field hierarchy; absent otherwise) The field that is the immediate parent of this one (the field, if any, whose Kids array includes this field).
protected  java.lang.String partialFieldName
           
static Name T_KEY
          (Optional) The partial field name (see 12.7.3.2, “Field Namesâ€?).
static Name TM_KEY
          (Optional; PDF 1.3) The mapping name that shall be used when exporting interactive form field data from the document.
static Name TU_KEY
          (Optional; PDF 1.3) An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface (such as in error or status messages referring to the field).
static Name V_KEY
          (Optional; inheritable) The field’s value, whose format varies depending on the field type.
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
FieldDictionary(Library library, java.util.HashMap entries)
           
 
Method Summary
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FT_KEY

public static final Name FT_KEY
Required for terminal fields; inheritable) The type of field that this dictionary describes:

Btn -> Button (see 12.7.4.2, “Button Fields�)

Tx -> Text (see 12.7.4.3, “Text Fields�)

Ch -> Choice (see 12.7.4.4, “Choice Fields�)

Sig(PDF 1.3) -> Signature (see 12.7.4.5, “Signature Fields�)

This entry may be present in a non-terminal field (one whose descendants are fields) to provide an inheritable FT value. However, a non-terminal field does not logically have a type of its own; it is merely a container for inheritable attributes that are intended for descendant terminal fields of any type.


KIDS_KEY

public static final Name KIDS_KEY
(Sometimes required, as described below) An array of indirect references to the immediate children of this field.

In a non-terminal field, the Kids array shall refer to field dictionaries that are immediate descendants of this field. In a terminal field, the Kids array ordinarily shall refer to one or more separate widget annotations that are associated with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field dictionary, Kids shall be omitted.


PARENT_KEY

public static final Name PARENT_KEY
(Required if this field is the child of another in the field hierarchy; absent otherwise) The field that is the immediate parent of this one (the field, if any, whose Kids array includes this field). A field can have at most one parent; that is, it can be included in the Kids array of at most one other field.


T_KEY

public static final Name T_KEY
(Optional) The partial field name (see 12.7.3.2, “Field Names�).


TU_KEY

public static final Name TU_KEY
(Optional; PDF 1.3) An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes (see 14.9.3, “Alternate Descriptions�).


TM_KEY

public static final Name TM_KEY
(Optional; PDF 1.3) The mapping name that shall be used when exporting interactive form field data from the document.


Ff_KEY

public static final Name Ff_KEY
(Optional; inheritable) A set of flags specifying various characteristics of the field (see Table 221). Default value: 0.


V_KEY

public static final Name V_KEY
(Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.


DV_KEY

public static final Name DV_KEY
(Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action�). The format of this value is the same as that of V.


AA_KEY

public static final Name AA_KEY
(Optional; PDF 1.2) An additional-actions dictionary defining the field’s behaviour in response to various trigger events (see 12.6.3, “Trigger Events�). This entry has exactly the same meaning as the AA entry in an annotation dictionary (see 12.5.2, “Annotation Dictionaries�).


fieldType

protected Name fieldType

partialFieldName

protected java.lang.String partialFieldName

alternativeFieldName

protected java.lang.String alternativeFieldName

exportMappingName

protected java.lang.String exportMappingName

flags

protected int flags

fieldValue

protected java.lang.String fieldValue
Constructor Detail

FieldDictionary

public FieldDictionary(Library library,
                       java.util.HashMap entries)