Field类

class pypdf.generic.Field(data: DictionaryObject)[源代码]

基类:TreeObject

A class representing a field dictionary.

This class is accessed through get_fields()

property field_type: NameObject | None

Read-only property accessing the type of this field.

property parent: DictionaryObject | None

Read-only property accessing the parent of this field.

property kids: ArrayObject | None

Read-only property accessing the kids of this field.

property name: str | None

Read-only property accessing the name of this field.

property alternate_name: str | None

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

property mapping_name: str | None

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

This name is used by pypdf as a key in the dictionary returned by get_fields()

property flags: int | None

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

property value: Any | None

Read-only property accessing the value of this field.

Format varies based on field type.

property default_value: Any | None

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

property additional_actions: DictionaryObject | None

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.