Skip to content

Commit

Permalink
MAINT: Update class PageAttributes (py-pdf#2682)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored May 27, 2024
1 parent 6dafbbe commit 6346e4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions pypdf/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,7 @@ def PROPERTIES(cls) -> str:


class PagesAttributes:
"""
Page Attributes, Table 6.2, Page 52.
Page tree node, Table 30 in the 2.0 reference.
"""
"""§7.7.3.2 of the 1.7 and 2.0 reference."""

TYPE = "/Type" # name, required; must be /Pages
PARENT = "/Parent" # dictionary, required; indirect reference to pages object
Expand All @@ -224,10 +221,7 @@ class PagesAttributes:


class PageAttributes:
"""
Table 3.27 Entries in a page object.
Table 31 in the 2.0 reference.
"""
"""§7.7.3.3 of the 1.7 and 2.0 reference."""

TYPE = "/Type" # name, required; must be /Page
PARENT = "/Parent" # dictionary, required; a pages object
Expand All @@ -253,11 +247,15 @@ class PageAttributes:
STRUCT_PARENTS = "/StructParents" # integer, optional
ID = "/ID" # byte string, optional
PZ = "/PZ" # number, optional
SEPARATION_INFO = "/SeparationInfo" # dictionary, optional
TABS = "/Tabs" # name, optional
TEMPLATE_INSTANTIATED = "/TemplateInstantiated" # name, optional
PRES_STEPS = "/PresSteps" # dictionary, optional
USER_UNIT = "/UserUnit" # number, optional
VP = "/VP" # dictionary, optional
AF = "/AF" # array of dictionaries, optional
OUTPUT_INTENTS = "/OutputIntents" # array, optional
D_PART = "/DPart" # dictionary, required, if this page is within the range of a DPart, not permitted otherwise


class FileSpecificationDictionaryEntries:
Expand Down
2 changes: 1 addition & 1 deletion pypdf/papersizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PaperSize:
595, 842
) # Printer paper, documents - this is by far the most common
A5 = Dimensions(420, 595) # Paperback books
A6 = Dimensions(298, 420) # Post cards
A6 = Dimensions(298, 420) # Postcards
A7 = Dimensions(210, 298)
A8 = Dimensions(147, 210)

Expand Down

0 comments on commit 6346e4c

Please sign in to comment.