常量

class pypdf.constants.AnnotationFlag(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:IntFlag

See §12.5.3 "Annotation Flags".

INVISIBLE = 1
HIDDEN = 2
PRINT = 4
NO_ZOOM = 8
NO_ROTATE = 16
NO_VIEW = 32
READ_ONLY = 64
LOCKED = 128
TOGGLE_NO_VIEW = 256
LOCKED_CONTENTS = 512
class pypdf.constants.ImageType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:IntFlag

NONE = 0
XOBJECT_IMAGES = 1
INLINE_IMAGES = 2
DRAWING_IMAGES = 4
ALL = 7
IMAGES = 7
class pypdf.constants.PageLabelStyle[源代码]

基类:object

Table 8.10 in the 1.7 reference. Table 161 in the 2.0 reference.

DECIMAL = '/D'
UPPERCASE_ROMAN = '/R'
LOWERCASE_ROMAN = '/r'
UPPERCASE_LETTER = '/A'
LOWERCASE_LETTER = '/a'
class pypdf.constants.UserAccessPermissions(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:IntFlag

Table 3.20 User access permissions. Table 22 of the 2.0 manual.

R1 = 1
R2 = 2
PRINT = 4
MODIFY = 8
EXTRACT = 16
ADD_OR_MODIFY = 32
R7 = 64
R8 = 128
FILL_FORM_FIELDS = 256
EXTRACT_TEXT_AND_GRAPHICS = 512
ASSEMBLE_DOC = 1024
PRINT_TO_REPRESENTATION = 2048
R13 = 4096
R14 = 8192
R15 = 16384
R16 = 32768
R17 = 65536
R18 = 131072
R19 = 262144
R20 = 524288
R21 = 1048576
R22 = 2097152
R23 = 4194304
R24 = 8388608
R25 = 16777216
R26 = 33554432
R27 = 67108864
R28 = 134217728
R29 = 268435456
R30 = 536870912
R31 = 1073741824
R32 = 2147483648
to_dict() Dict[str, bool][源代码]

Convert the given flag value to a corresponding verbose name mapping.

classmethod from_dict(value: Dict[str, bool]) UserAccessPermissions[源代码]

Convert the verbose name mapping to the corresponding flag value.

classmethod all() UserAccessPermissions[源代码]
class pypdf.constants.FieldDictionaryAttributes[源代码]

基类:object

Entries common to all field dictionaries (Table 8.69 PDF 1.7 reference) (very partially documented here).

FFBits provides the constants used for /Ff from Table 8.70/8.75/8.77/8.79

Ff = '/Ff'
class FfBits(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:IntFlag

Ease building /Ff flags Some entries may be specific to:

  • Text (Tx) (Table 8.75 PDF 1.7 reference)

  • Buttons (Btn) (Table 8.77 PDF 1.7 reference)

  • Choice (Ch) (Table 8.79 PDF 1.7 reference)

ReadOnly = 1

common to Tx/Btn/Ch in Table 8.70

Required = 2

common to Tx/Btn/Ch in Table 8.70

NoExport = 4

common to Tx/Btn/Ch in Table 8.70

Multiline = 4096

Tx

Password = 8192

Tx

NoToggleToOff = 16384

Btn

Radio = 32768

Btn

Pushbutton = 65536

Btn

Combo = 131072

Ch

Edit = 262144

Ch

Sort = 524288

Ch

FileSelect = 1048576

Tx

MultiSelect = 2097152

Tx

DoNotSpellCheck = 4194304

Tx/Ch

DoNotScroll = 8388608

Tx

Comb = 16777216

Tx

RadiosInUnison = 33554432

Btn

RichText = 33554432

Tx

CommitOnSelChange = 67108864

Ch