-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: Use grouped constants instead of literals
This allows us to document what they are good for and to distinguish literals of the same name but of different contexts, e.g. /Type in Pages or /Type in Page
- Loading branch information
1 parent
e45e66b
commit c1107cf
Showing
3 changed files
with
56 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
See Portable Document Format Reference Manual, 1993. ISBN 0-201-62628-4. | ||
See https://ia802202.us.archive.org/8/items/pdfy-0vt8s-egqFwDl7L2/PDF%20Reference%201.0.pdf | ||
""" | ||
|
||
class PagesAttributes: | ||
"""Page Attributes, Table 6.2, Page 52""" | ||
TYPE = "/Type" # name, required; must be /Pages | ||
KIDS = "/Kids" # array, required; List of indirect references | ||
COUNT = "/Count" # integer, required; the number of all nodes und this node | ||
PARENT = "/Parent" # dictionary, required; indirect reference to pages object | ||
|
||
class PageAttributes: | ||
"""Page attributes, Table 6.3, Page 53""" | ||
TYPE = "/Type" # name, required; must be /Page | ||
MEDIABOX = "/MediaBox" # array, required; rectangle specifying page size | ||
... |