1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//! The dictionary keys this crate reads, added to the shared table.
//!
//! `pdfrum-object`'s `names` module owns the keys several crates share; the
//! ones below are document-feature keys that only appear here.
#[allow(unused_imports)]
pub(crate) use pdfrum_object::names::{
AA, ACRO_FORM, AIS, ANNOTS, AP, AS, BASE_ENCODING, BASE_FONT, BBOX, BC, BG, BM, BORDER, C, CA,
CA_LOWER, COLOR_SPACE, CONTENTS, COUNT, CROP_BOX, D, DA, DESTS, DIFFERENCES, DV, E,
EMBEDDED_FILES, ENCODING, ENCRYPT, EXT_G_STATE, F, FF, FILTER, FIRST, FLAGS, FONT,
FONT_DESCRIPTOR, FORM, FORM_TYPE, FT, H, I, IC, ID, INK_LIST, IX, JAVA_SCRIPT, K, KIDS, L,
LENGTH, MATRIX, MEDIA_BOX, METADATA, MULTIPLY, N, NAMES, NORMAL, OUTLINES, P, PAGE,
PAGE_LABELS, PAGES, PARENT, Q, QUAD_POINTS, R, RECT, RESOURCES, RI, ROTATE, S, SIZE, SMASK,
SUBTYPE, T, TITLE, TRUE_TYPE, TU, TYPE, TYPE1, V, VIEWER_PREFERENCES, W, WIN_ANSI_ENCODING,
XML, XOBJECT,
};
pdfrum_object::names! {
// ---- Outline ----
/// The next sibling of an outline item (`/Next`).
NEXT = "Next";
/// A destination, on an outline item, link or action (`/Dest`).
DEST = "Dest";
/// An action dictionary (`/A`).
A = "A";
/// The `/Type` an action dictionary declares, when it declares one
/// (`/Action`).
ANNOT_ACTION = "Action";
// ---- Name and number trees ----
/// A tree node's least and greatest key (`/Limits`).
LIMITS = "Limits";
/// A number tree leaf's key/value pairs (`/Nums`).
NUMS = "Nums";
// ---- Actions ----
/// A file specification's Windows-specific launch parameters (`/Win`).
WIN = "Win";
/// A uniform resource identifier, and the catalog's base-URI dictionary
/// (`/URI`).
URI = "URI";
/// The base against which a relative `/URI` resolves (`/Base`).
BASE = "Base";
/// The fields a form action applies to (`/Fields`).
FIELDS = "Fields";
/// The order a recalculation visits fields in (`/AcroForm /CO`).
CALCULATION_ORDER = "CO";
/// A JavaScript action's program (`/JS`).
JS = "JS";
/// The action a reader runs when the document opens (`/OpenAction`).
/// Also legally a destination array, which is not an action.
OPEN_ACTION = "OpenAction";
// ---- File specifications ----
/// The Unicode file name (`/UF`).
UF = "UF";
/// The file-system name, `URL` meaning the path is a URL (`/FS`).
FS = "FS";
/// A DOS-flavoured file name (`/DOS`).
DOS = "DOS";
/// A Mac OS-flavoured file name (`/Mac`).
MAC = "Mac";
/// A Unix-flavoured file name (`/Unix`).
UNIX = "Unix";
/// The embedded file streams of a file specification (`/EF`).
EF = "EF";
/// An embedded file stream's parameter dictionary (`/Params`).
PARAMS = "Params";
// ---- Structure tree ----
/// The catalog's structure tree root (`/StructTreeRoot`).
STRUCT_TREE_ROOT = "StructTreeRoot";
/// Whether the document is tagged (`/MarkInfo`).
MARK_INFO = "MarkInfo";
/// The tagging flag inside `/MarkInfo` (`/Marked`).
MARKED = "Marked";
/// The structure element type to standard type mapping (`/RoleMap`).
ROLE_MAP = "RoleMap";
/// The number tree from `/StructParents` keys to structure elements
/// (`/ParentTree`).
PARENT_TREE = "ParentTree";
/// A page's or form's key into the parent tree (`/StructParents`).
///
/// Not to be confused with the singular `/StructParent`, which is what an
/// *annotation* carries; the two are different keys with different
/// meanings and only one of them appears on a page.
STRUCT_PARENTS = "StructParents";
/// A structure element's page (`/Pg`).
PG = "Pg";
/// A marked-content reference's content stream (`/Stm`).
STM = "Stm";
/// A marked-content identifier (`/MCID`).
MCID = "MCID";
/// An object reference's target (`/Obj`).
OBJ = "Obj";
/// A marked-content reference (`/MCR`).
MCR = "MCR";
/// An object reference kid (`/OBJR`).
OBJR = "OBJR";
/// A structure element (`/StructElem`).
STRUCT_ELEM = "StructElem";
/// Alternate text for a structure element (`/Alt`).
ALT = "Alt";
/// The exact text a structure element replaces (`/ActualText`).
ACTUAL_TEXT = "ActualText";
/// A natural-language identifier (`/Lang`).
LANG = "Lang";
// ---- Page labels ----
/// A page label's prefix (`/P`), also a widget's page and a permissions
/// word — the meaning follows the dictionary.
ST = "St";
// ---- Viewer preferences ----
/// The reading order of the page display (`/Direction`).
DIRECTION = "Direction";
/// Whether the print dialog offers page scaling (`/PrintScaling`).
PRINT_SCALING = "PrintScaling";
/// The default number of printed copies (`/NumCopies`).
NUM_COPIES = "NumCopies";
/// The default printed page range (`/PrintPageRange`).
PRINT_PAGE_RANGE = "PrintPageRange";
/// The default duplex handling (`/Duplex`).
DUPLEX = "Duplex";
// ---- Annotations ----
/// A border style dictionary (`/BS`).
BS = "BS";
/// The marker key PDFium writes on an annotation whose appearance it
/// generated (`/PDFIUM_HasGeneratedAP`).
HAS_GENERATED_AP = "PDFIUM_HasGeneratedAP";
/// A popup annotation attached to a markup annotation (`/Popup`).
POPUP = "Popup";
/// An annotation dictionary's type value (`/Annot`).
ANNOT = "Annot";
// ---- Appearance streams and their resources ----
/// The single graphics state entry every generated appearance uses
/// (`/GS`).
GS = "GS";
// ---- Form fields ----
/// The default resources a form's `/DA` strings name (`/DR`).
DR = "DR";
/// A text field's maximum length, and a comb field's cell count
/// (`/MaxLen`).
MAX_LEN = "MaxLen";
/// A choice field's options (`/Opt`).
OPT = "Opt";
/// A list box's first visible option (`/TI`).
TI = "TI";
/// Whether the viewer must regenerate every widget appearance
/// (`/NeedAppearances`).
NEED_APPEARANCES = "NeedAppearances";
/// A widget annotation subtype (`/Widget`).
WIDGET = "Widget";
/// A widget's appearance characteristics (`/MK`).
MK = "MK";
/// An icon's fitting rules (`/IF`).
IF = "IF";
/// How an icon scales (`/SW`).
SW = "SW";
/// Whether an icon's bounding box is fitted (`/FB`).
FB = "FB";
/// A caption's position relative to its icon (`/TP`).
TP = "TP";
/// The state a widget shows when off (`/Off`).
OFF = "Off";
/// The default on-state name when a checkbox names none (`/Yes`).
YES = "Yes";
}