The Field Class

class PyPDF2.generic.Field(data: Dict[str, Any])[source]

Bases: PyPDF2.generic.TreeObject

A class representing a field dictionary. This class is accessed through get_fields()

property additionalActions: Optional[PyPDF2.generic.DictionaryObject]

Deprecated since version 1.28.3.

Use additional_actions instead.

property additional_actions: Optional[PyPDF2.generic.DictionaryObject]

Read-only property accessing the additional actions dictionary. This dictionary defines the field’s behavior in response to trigger events. See Section 8.5.2 of the PDF 1.7 reference.

property altName: Optional[str]

Deprecated since version 1.28.3.

Use alternate_name instead.

property alternate_name: Optional[str]

Read-only property accessing the alternate name of this field.

property defaultValue: Optional[Any]

Deprecated since version 1.28.3.

Use default_value instead.

property default_value: Optional[Any]

Read-only property accessing the default value of this field.

property fieldType: Optional[PyPDF2.generic.NameObject]

Deprecated since version 1.28.3.

Use field_type instead.

property field_type: Optional[PyPDF2.generic.NameObject]

Read-only property accessing the type of this field.

property flags: Optional[int]

Read-only property accessing the field flags, specifying various characteristics of the field (see Table 8.70 of the PDF 1.7 reference).

property kids: Optional[PyPDF2.generic.ArrayObject]

Read-only property accessing the kids of this field.

property mappingName: Optional[str]

Deprecated since version 1.28.3.

Use mapping_name instead.

property mapping_name: Optional[str]

Read-only property accessing the mapping name of this field. This name is used by PyPDF2 as a key in the dictionary returned by get_fields()

property name: Optional[str]

Read-only property accessing the name of this field.

property parent: Optional[PyPDF2.generic.DictionaryObject]

Read-only property accessing the parent of this field.

property value: Optional[Any]

Read-only property accessing the value of this field. Format varies based on field type.