blitz-pdf 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +300 -10
- package/THIRD_PARTY_NOTICES.md +4 -2
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/document-options.d.ts +36 -0
- package/dist/document-options.d.ts.map +1 -0
- package/dist/document-options.js +236 -0
- package/dist/document-options.js.map +1 -0
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/options.d.ts +35 -1
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +21 -14
- package/dist/options.js.map +1 -1
- package/dist/types.d.ts +71 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +7 -0
- package/dist/validation.js.map +1 -0
- package/examples/zugferd.mjs +41 -0
- package/licenses/RUST_DEPENDENCIES.txt +27 -0
- package/package.json +3 -2
- package/src/browser.ts +1 -1
- package/src/document-options.ts +218 -0
- package/src/node.ts +1 -1
- package/src/options.ts +18 -13
- package/src/types.ts +76 -1
- package/src/validation.ts +6 -0
- package/vendor/README.md +27 -2
- package/vendor/krilla/.cargo-ok +1 -0
- package/vendor/krilla/.cargo_vcs_info.json +6 -0
- package/vendor/krilla/Cargo.lock +1357 -0
- package/vendor/krilla/Cargo.toml +165 -0
- package/vendor/krilla/LICENSE_APACHE +202 -0
- package/vendor/krilla/LICENSE_MIT +21 -0
- package/vendor/krilla/README.md +156 -0
- package/vendor/krilla/examples/basic.rs +117 -0
- package/vendor/krilla/examples/empty_document.rs +25 -0
- package/vendor/krilla/examples/parley.rs +174 -0
- package/vendor/krilla/examples/simple_text.rs +118 -0
- package/vendor/krilla/examples/stream_builder.rs +93 -0
- package/vendor/krilla/icc/LICENSE +116 -0
- package/vendor/krilla/icc/README.md +1 -0
- package/vendor/krilla/icc/sGrey-v2-magic.icc +0 -0
- package/vendor/krilla/icc/sGrey-v4.icc +0 -0
- package/vendor/krilla/icc/sRGB-v2-magic.icc +0 -0
- package/vendor/krilla/icc/sRGB-v4.icc +0 -0
- package/vendor/krilla/src/chunk_container.rs +503 -0
- package/vendor/krilla/src/configure/PDF_A1.md +227 -0
- package/vendor/krilla/src/configure/PDF_A2.md +269 -0
- package/vendor/krilla/src/configure/PDF_A3.md +31 -0
- package/vendor/krilla/src/configure/PDF_A4.md +211 -0
- package/vendor/krilla/src/configure/PDF_UA1.md +202 -0
- package/vendor/krilla/src/configure/README.md +23 -0
- package/vendor/krilla/src/configure/mod.rs +197 -0
- package/vendor/krilla/src/configure/validate.rs +1244 -0
- package/vendor/krilla/src/configure/version.rs +134 -0
- package/vendor/krilla/src/content.rs +1352 -0
- package/vendor/krilla/src/data.rs +49 -0
- package/vendor/krilla/src/document.rs +156 -0
- package/vendor/krilla/src/error.rs +170 -0
- package/vendor/krilla/src/geom.rs +341 -0
- package/vendor/krilla/src/graphics/blend.rs +46 -0
- package/vendor/krilla/src/graphics/color.rs +552 -0
- package/vendor/krilla/src/graphics/graphic.rs +30 -0
- package/vendor/krilla/src/graphics/graphics_state.rs +251 -0
- package/vendor/krilla/src/graphics/icc.rs +218 -0
- package/vendor/krilla/src/graphics/image.rs +835 -0
- package/vendor/krilla/src/graphics/mask.rs +128 -0
- package/vendor/krilla/src/graphics/mod.rs +14 -0
- package/vendor/krilla/src/graphics/paint.rs +434 -0
- package/vendor/krilla/src/graphics/separation.rs +86 -0
- package/vendor/krilla/src/graphics/shading_function.rs +865 -0
- package/vendor/krilla/src/graphics/shading_pattern.rs +60 -0
- package/vendor/krilla/src/graphics/tiling_pattern.rs +119 -0
- package/vendor/krilla/src/graphics/xobject.rs +150 -0
- package/vendor/krilla/src/interactive/action.rs +68 -0
- package/vendor/krilla/src/interactive/annotation.rs +283 -0
- package/vendor/krilla/src/interactive/destination.rs +289 -0
- package/vendor/krilla/src/interactive/mod.rs +3 -0
- package/vendor/krilla/src/interchange/embed.rs +240 -0
- package/vendor/krilla/src/interchange/metadata.rs +564 -0
- package/vendor/krilla/src/interchange/mod.rs +4 -0
- package/vendor/krilla/src/interchange/outline.rs +263 -0
- package/vendor/krilla/src/interchange/tagging/fmt.rs +733 -0
- package/vendor/krilla/src/interchange/tagging/generate.toml +474 -0
- package/vendor/krilla/src/interchange/tagging/generated.rs +4754 -0
- package/vendor/krilla/src/interchange/tagging/mod.rs +1324 -0
- package/vendor/krilla/src/interchange/tagging/tag.rs +686 -0
- package/vendor/krilla/src/lib.rs +179 -0
- package/vendor/krilla/src/num.rs +26 -0
- package/vendor/krilla/src/page.rs +612 -0
- package/vendor/krilla/src/pdf.rs +313 -0
- package/vendor/krilla/src/resource.rs +436 -0
- package/vendor/krilla/src/serialize.rs +1101 -0
- package/vendor/krilla/src/stream.rs +368 -0
- package/vendor/krilla/src/surface.rs +664 -0
- package/vendor/krilla/src/text/cid.rs +488 -0
- package/vendor/krilla/src/text/font.rs +351 -0
- package/vendor/krilla/src/text/glyph/bitmap.rs +81 -0
- package/vendor/krilla/src/text/glyph/colr.rs +581 -0
- package/vendor/krilla/src/text/glyph/mod.rs +205 -0
- package/vendor/krilla/src/text/glyph/outline.rs +72 -0
- package/vendor/krilla/src/text/glyph/svg.rs +34 -0
- package/vendor/krilla/src/text/group.rs +463 -0
- package/vendor/krilla/src/text/mod.rs +232 -0
- package/vendor/krilla/src/text/shape.rs +102 -0
- package/vendor/krilla/src/text/type3.rs +514 -0
- package/vendor/krilla/src/util.rs +286 -0
- package/vendor/stylo/properties/longhands.toml +0 -1
- package/vendor/stylo/stylesheets/rule_parser.rs +1 -1
- package/wasm/blitz_pdf.js +10 -5
- package/wasm/blitz_pdf_bg.wasm +0 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
# A tag for group nodes.
|
|
2
|
+
[Tag]
|
|
3
|
+
# A part of a document that may contain multiple articles or sections.
|
|
4
|
+
[Tag.Part]
|
|
5
|
+
# An article with largely self-contained content.
|
|
6
|
+
[Tag.Article]
|
|
7
|
+
optional = [
|
|
8
|
+
"Layout::ColumnCount",
|
|
9
|
+
"Layout::ColumnGap",
|
|
10
|
+
"Layout::ColumnWidths",
|
|
11
|
+
]
|
|
12
|
+
# Section of a larger document.
|
|
13
|
+
[Tag.Section]
|
|
14
|
+
optional = [
|
|
15
|
+
"Layout::ColumnCount",
|
|
16
|
+
"Layout::ColumnGap",
|
|
17
|
+
"Layout::ColumnWidths",
|
|
18
|
+
]
|
|
19
|
+
# A generic block-level grouping element.
|
|
20
|
+
[Tag.Div]
|
|
21
|
+
optional = [
|
|
22
|
+
"Layout::ColumnCount",
|
|
23
|
+
"Layout::ColumnGap",
|
|
24
|
+
"Layout::ColumnWidths",
|
|
25
|
+
]
|
|
26
|
+
# A paragraph-level quote.
|
|
27
|
+
[Tag.BlockQuote]
|
|
28
|
+
# An image or figure caption.
|
|
29
|
+
#
|
|
30
|
+
# **Best Practice**: In the tag tree, this should appear
|
|
31
|
+
# as a sibling after the image (or other) content it describes.
|
|
32
|
+
[Tag.Caption]
|
|
33
|
+
# Table of contents.
|
|
34
|
+
#
|
|
35
|
+
# **Best Practice**: Should consist of TOCIs or other nested TOCs.
|
|
36
|
+
[Tag.TOC]
|
|
37
|
+
# Item in the table of contents.
|
|
38
|
+
#
|
|
39
|
+
# **Best Practice**: Should only appear within a TOC. Should only consist of
|
|
40
|
+
# labels, references, paragraphs and TOCs.
|
|
41
|
+
[Tag.TOCI]
|
|
42
|
+
# Index of the key terms in the document.
|
|
43
|
+
#
|
|
44
|
+
# **Best Practice**: Should contain a sequence of text accompanied by
|
|
45
|
+
# reference elements pointing to their occurrence in the text.
|
|
46
|
+
[Tag.Index]
|
|
47
|
+
# A paragraph.
|
|
48
|
+
[Tag.P]
|
|
49
|
+
optional = [
|
|
50
|
+
"Layout::SpaceBefore",
|
|
51
|
+
"Layout::SpaceAfter",
|
|
52
|
+
"Layout::StartIndent",
|
|
53
|
+
"Layout::EndIndent",
|
|
54
|
+
"Layout::TextIndent",
|
|
55
|
+
"Layout::TextAlign",
|
|
56
|
+
"Layout::LineHeight",
|
|
57
|
+
"Layout::BaselineShift",
|
|
58
|
+
"Layout::TextDecorationColor",
|
|
59
|
+
"Layout::TextDecorationThickness",
|
|
60
|
+
"Layout::TextDecorationType",
|
|
61
|
+
]
|
|
62
|
+
# Heading level `n`, including an optional title of the heading.
|
|
63
|
+
#
|
|
64
|
+
# The title is required for some export modes, like for example PDF/UA.
|
|
65
|
+
[Tag.Hn]
|
|
66
|
+
required = ["Struct::HeadingLevel"]
|
|
67
|
+
suggested = ["Struct::Title"]
|
|
68
|
+
optional = [
|
|
69
|
+
"Struct::Title",
|
|
70
|
+
"Layout::SpaceBefore",
|
|
71
|
+
"Layout::SpaceAfter",
|
|
72
|
+
"Layout::StartIndent",
|
|
73
|
+
"Layout::EndIndent",
|
|
74
|
+
"Layout::TextIndent",
|
|
75
|
+
"Layout::TextAlign",
|
|
76
|
+
"Layout::LineHeight",
|
|
77
|
+
"Layout::BaselineShift",
|
|
78
|
+
"Layout::TextDecorationColor",
|
|
79
|
+
"Layout::TextDecorationThickness",
|
|
80
|
+
"Layout::TextDecorationType",
|
|
81
|
+
]
|
|
82
|
+
# A list.
|
|
83
|
+
#
|
|
84
|
+
# **Best practice**: Should consist of an optional caption followed by
|
|
85
|
+
# list items.
|
|
86
|
+
# List numbering is only required for PDF/UA, but we just enforce it for always.
|
|
87
|
+
[Tag.L]
|
|
88
|
+
required = ["List::Numbering"]
|
|
89
|
+
optional = [
|
|
90
|
+
"Layout::SpaceBefore",
|
|
91
|
+
"Layout::SpaceAfter",
|
|
92
|
+
"Layout::StartIndent",
|
|
93
|
+
"Layout::EndIndent",
|
|
94
|
+
"Layout::TextIndent",
|
|
95
|
+
"Layout::TextAlign",
|
|
96
|
+
"Layout::LineHeight",
|
|
97
|
+
"Layout::BaselineShift",
|
|
98
|
+
"Layout::TextDecorationColor",
|
|
99
|
+
"Layout::TextDecorationThickness",
|
|
100
|
+
"Layout::TextDecorationType",
|
|
101
|
+
]
|
|
102
|
+
# A list item.
|
|
103
|
+
#
|
|
104
|
+
# **Best practice**: Should consist of one or more list labels and/or list bodies.
|
|
105
|
+
[Tag.LI]
|
|
106
|
+
optional = [
|
|
107
|
+
"Layout::SpaceBefore",
|
|
108
|
+
"Layout::SpaceAfter",
|
|
109
|
+
"Layout::StartIndent",
|
|
110
|
+
"Layout::EndIndent",
|
|
111
|
+
"Layout::TextIndent",
|
|
112
|
+
"Layout::TextAlign",
|
|
113
|
+
"Layout::LineHeight",
|
|
114
|
+
"Layout::BaselineShift",
|
|
115
|
+
"Layout::TextDecorationColor",
|
|
116
|
+
"Layout::TextDecorationThickness",
|
|
117
|
+
"Layout::TextDecorationType",
|
|
118
|
+
]
|
|
119
|
+
# Label for a list item.
|
|
120
|
+
[Tag.Lbl]
|
|
121
|
+
optional = [
|
|
122
|
+
"Layout::SpaceBefore",
|
|
123
|
+
"Layout::SpaceAfter",
|
|
124
|
+
"Layout::StartIndent",
|
|
125
|
+
"Layout::EndIndent",
|
|
126
|
+
"Layout::TextIndent",
|
|
127
|
+
"Layout::TextAlign",
|
|
128
|
+
"Layout::LineHeight",
|
|
129
|
+
"Layout::BaselineShift",
|
|
130
|
+
"Layout::TextDecorationColor",
|
|
131
|
+
"Layout::TextDecorationThickness",
|
|
132
|
+
"Layout::TextDecorationType",
|
|
133
|
+
]
|
|
134
|
+
# Description of the list item.
|
|
135
|
+
[Tag.LBody]
|
|
136
|
+
optional = [
|
|
137
|
+
"Layout::SpaceBefore",
|
|
138
|
+
"Layout::SpaceAfter",
|
|
139
|
+
"Layout::StartIndent",
|
|
140
|
+
"Layout::EndIndent",
|
|
141
|
+
"Layout::TextIndent",
|
|
142
|
+
"Layout::TextAlign",
|
|
143
|
+
"Layout::LineHeight",
|
|
144
|
+
"Layout::BaselineShift",
|
|
145
|
+
"Layout::TextDecorationColor",
|
|
146
|
+
"Layout::TextDecorationThickness",
|
|
147
|
+
"Layout::TextDecorationType",
|
|
148
|
+
]
|
|
149
|
+
# A table, with an optional summary describing the purpose and structure.
|
|
150
|
+
#
|
|
151
|
+
# **Best practice**: Should consist of an optional table header row,
|
|
152
|
+
# one or more table body elements and an optional table footer. Can have
|
|
153
|
+
# caption as the first or last child.
|
|
154
|
+
[Tag.Table]
|
|
155
|
+
optional = [
|
|
156
|
+
"Table::Summary",
|
|
157
|
+
"Layout::BBox",
|
|
158
|
+
"Layout::Width",
|
|
159
|
+
"Layout::Height",
|
|
160
|
+
"Layout::SpaceBefore",
|
|
161
|
+
"Layout::SpaceAfter",
|
|
162
|
+
"Layout::StartIndent",
|
|
163
|
+
"Layout::EndIndent",
|
|
164
|
+
"Layout::TextIndent",
|
|
165
|
+
"Layout::TextAlign",
|
|
166
|
+
"Layout::LineHeight",
|
|
167
|
+
"Layout::BaselineShift",
|
|
168
|
+
"Layout::TextDecorationColor",
|
|
169
|
+
"Layout::TextDecorationThickness",
|
|
170
|
+
"Layout::TextDecorationType",
|
|
171
|
+
]
|
|
172
|
+
# A table row.
|
|
173
|
+
#
|
|
174
|
+
# **Best practice**: May contain table headers cells and table data cells.
|
|
175
|
+
[Tag.TR]
|
|
176
|
+
# A table header cell.
|
|
177
|
+
[Tag.TH]
|
|
178
|
+
required = ["Table::HeaderScope"]
|
|
179
|
+
optional = [
|
|
180
|
+
"Table::CellHeaders",
|
|
181
|
+
"Table::RowSpan",
|
|
182
|
+
"Table::ColSpan",
|
|
183
|
+
"Layout::Width",
|
|
184
|
+
"Layout::Height",
|
|
185
|
+
"Layout::TableBorderStyle",
|
|
186
|
+
"Layout::TablePadding",
|
|
187
|
+
"Layout::BlockAlign",
|
|
188
|
+
"Layout::InlineAlign",
|
|
189
|
+
]
|
|
190
|
+
# A table data cell.
|
|
191
|
+
[Tag.TD]
|
|
192
|
+
optional = [
|
|
193
|
+
"Table::CellHeaders",
|
|
194
|
+
"Table::RowSpan",
|
|
195
|
+
"Table::ColSpan",
|
|
196
|
+
"Layout::Width",
|
|
197
|
+
"Layout::Height",
|
|
198
|
+
"Layout::TableBorderStyle",
|
|
199
|
+
"Layout::TablePadding",
|
|
200
|
+
"Layout::BlockAlign",
|
|
201
|
+
"Layout::InlineAlign",
|
|
202
|
+
]
|
|
203
|
+
# A table header row group.
|
|
204
|
+
[Tag.THead]
|
|
205
|
+
# A table data row group.
|
|
206
|
+
[Tag.TBody]
|
|
207
|
+
# A table footer row group.
|
|
208
|
+
[Tag.TFoot]
|
|
209
|
+
# An inline-level element that does not have a specific meaning.
|
|
210
|
+
[Tag.Span]
|
|
211
|
+
optional = [
|
|
212
|
+
"Layout::SpaceBefore",
|
|
213
|
+
"Layout::SpaceAfter",
|
|
214
|
+
"Layout::StartIndent",
|
|
215
|
+
"Layout::EndIndent",
|
|
216
|
+
"Layout::LineHeight",
|
|
217
|
+
"Layout::BaselineShift",
|
|
218
|
+
"Layout::TextDecorationColor",
|
|
219
|
+
"Layout::TextDecorationThickness",
|
|
220
|
+
"Layout::TextDecorationType",
|
|
221
|
+
]
|
|
222
|
+
# An inline quotation.
|
|
223
|
+
[Tag.InlineQuote]
|
|
224
|
+
optional = [
|
|
225
|
+
"Layout::SpaceBefore",
|
|
226
|
+
"Layout::SpaceAfter",
|
|
227
|
+
"Layout::StartIndent",
|
|
228
|
+
"Layout::EndIndent",
|
|
229
|
+
"Layout::LineHeight",
|
|
230
|
+
"Layout::BaselineShift",
|
|
231
|
+
"Layout::TextDecorationColor",
|
|
232
|
+
"Layout::TextDecorationThickness",
|
|
233
|
+
"Layout::TextDecorationType",
|
|
234
|
+
]
|
|
235
|
+
# A foot- or endnote, potentially referred to from within the text.
|
|
236
|
+
#
|
|
237
|
+
# **Best practice**: It may have a label as a child.
|
|
238
|
+
[Tag.Note]
|
|
239
|
+
optional = [
|
|
240
|
+
"Layout::SpaceBefore",
|
|
241
|
+
"Layout::SpaceAfter",
|
|
242
|
+
"Layout::StartIndent",
|
|
243
|
+
"Layout::EndIndent",
|
|
244
|
+
"Layout::LineHeight",
|
|
245
|
+
"Layout::BaselineShift",
|
|
246
|
+
"Layout::TextDecorationColor",
|
|
247
|
+
"Layout::TextDecorationThickness",
|
|
248
|
+
"Layout::TextDecorationType",
|
|
249
|
+
]
|
|
250
|
+
# A reference to elsewhere in the document.
|
|
251
|
+
#
|
|
252
|
+
# **Best practice**: The first child of a tag group with this tag should be a link annotation
|
|
253
|
+
# linking to a destination in the document, and the second child should consist of
|
|
254
|
+
# the children that should be associated with that reference.
|
|
255
|
+
[Tag.Reference]
|
|
256
|
+
optional = [
|
|
257
|
+
"Layout::SpaceBefore",
|
|
258
|
+
"Layout::SpaceAfter",
|
|
259
|
+
"Layout::StartIndent",
|
|
260
|
+
"Layout::EndIndent",
|
|
261
|
+
"Layout::LineHeight",
|
|
262
|
+
"Layout::BaselineShift",
|
|
263
|
+
"Layout::TextDecorationColor",
|
|
264
|
+
"Layout::TextDecorationThickness",
|
|
265
|
+
"Layout::TextDecorationType",
|
|
266
|
+
]
|
|
267
|
+
# A reference to the external source of some cited document.
|
|
268
|
+
#
|
|
269
|
+
# **Best practice**: It may have a label as a child.
|
|
270
|
+
[Tag.BibEntry]
|
|
271
|
+
optional = [
|
|
272
|
+
"Layout::SpaceBefore",
|
|
273
|
+
"Layout::SpaceAfter",
|
|
274
|
+
"Layout::StartIndent",
|
|
275
|
+
"Layout::EndIndent",
|
|
276
|
+
"Layout::LineHeight",
|
|
277
|
+
"Layout::BaselineShift",
|
|
278
|
+
"Layout::TextDecorationColor",
|
|
279
|
+
"Layout::TextDecorationThickness",
|
|
280
|
+
"Layout::TextDecorationType",
|
|
281
|
+
]
|
|
282
|
+
# Computer code.
|
|
283
|
+
[Tag.Code]
|
|
284
|
+
optional = [
|
|
285
|
+
"Layout::SpaceBefore",
|
|
286
|
+
"Layout::SpaceAfter",
|
|
287
|
+
"Layout::StartIndent",
|
|
288
|
+
"Layout::EndIndent",
|
|
289
|
+
"Layout::LineHeight",
|
|
290
|
+
"Layout::BaselineShift",
|
|
291
|
+
"Layout::TextDecorationColor",
|
|
292
|
+
"Layout::TextDecorationThickness",
|
|
293
|
+
"Layout::TextDecorationType",
|
|
294
|
+
]
|
|
295
|
+
# A link.
|
|
296
|
+
#
|
|
297
|
+
# **Best practice**: The first child of a tag group with this tag should be a link annotation
|
|
298
|
+
# linking to an URL, and the second child should consist of the children that should
|
|
299
|
+
# be associated with that link.
|
|
300
|
+
[Tag.Link]
|
|
301
|
+
optional = [
|
|
302
|
+
"Layout::SpaceBefore",
|
|
303
|
+
"Layout::SpaceAfter",
|
|
304
|
+
"Layout::StartIndent",
|
|
305
|
+
"Layout::EndIndent",
|
|
306
|
+
"Layout::LineHeight",
|
|
307
|
+
"Layout::BaselineShift",
|
|
308
|
+
"Layout::TextDecorationColor",
|
|
309
|
+
"Layout::TextDecorationThickness",
|
|
310
|
+
"Layout::TextDecorationType",
|
|
311
|
+
]
|
|
312
|
+
# An association between an annotation and the content it belongs to. PDF
|
|
313
|
+
#
|
|
314
|
+
# **Best practice**: Should be used for all annotations, except for link annotations and
|
|
315
|
+
# widget annotations. The first child should be the identifier of a non-link annotation,
|
|
316
|
+
# and all other subsequent children should be content identifiers associated with that
|
|
317
|
+
# annotation.
|
|
318
|
+
[Tag.Annot]
|
|
319
|
+
optional = [
|
|
320
|
+
"Layout::SpaceBefore",
|
|
321
|
+
"Layout::SpaceAfter",
|
|
322
|
+
"Layout::StartIndent",
|
|
323
|
+
"Layout::EndIndent",
|
|
324
|
+
"Layout::LineHeight",
|
|
325
|
+
"Layout::BaselineShift",
|
|
326
|
+
"Layout::TextDecorationColor",
|
|
327
|
+
"Layout::TextDecorationThickness",
|
|
328
|
+
"Layout::TextDecorationType",
|
|
329
|
+
]
|
|
330
|
+
# Item of graphical content.
|
|
331
|
+
#
|
|
332
|
+
# Providing `alt_text` is required in some export modes, like for example PDF/UA-1.
|
|
333
|
+
[Tag.Figure]
|
|
334
|
+
suggested = ["Struct::AltText"]
|
|
335
|
+
optional = [
|
|
336
|
+
"Layout::BBox",
|
|
337
|
+
"Layout::Width",
|
|
338
|
+
"Layout::Height",
|
|
339
|
+
]
|
|
340
|
+
# A mathematical formula.
|
|
341
|
+
#
|
|
342
|
+
# Providing `alt_text` is required in some export modes, like for example PDF/UA-1.
|
|
343
|
+
[Tag.Formula]
|
|
344
|
+
suggested = ["Struct::AltText"]
|
|
345
|
+
optional = [
|
|
346
|
+
"Layout::BBox",
|
|
347
|
+
"Layout::Width",
|
|
348
|
+
"Layout::Height",
|
|
349
|
+
]
|
|
350
|
+
# An interactive form field.
|
|
351
|
+
[Tag.Form]
|
|
352
|
+
# Non-structural element. A grouping element having no inherent structural significance;
|
|
353
|
+
# it serves solely for grouping purposes.
|
|
354
|
+
[Tag.NonStruct]
|
|
355
|
+
|
|
356
|
+
# Non-standard role-mapped tag kinds:
|
|
357
|
+
|
|
358
|
+
# A date or time.
|
|
359
|
+
[Tag.Datetime]
|
|
360
|
+
# A list of terms.
|
|
361
|
+
[Tag.Terms]
|
|
362
|
+
# A title.
|
|
363
|
+
[Tag.Title]
|
|
364
|
+
# Encloses content with strong importance, most commonly **bold** text.
|
|
365
|
+
[Tag.Strong]
|
|
366
|
+
# Encloses content that is emphasized, most commonly *italic* text.
|
|
367
|
+
[Tag.Em]
|
|
368
|
+
|
|
369
|
+
[Attr.Struct]
|
|
370
|
+
# The tag id.
|
|
371
|
+
Id = { type = "TagId", global = true }
|
|
372
|
+
# The language of this tag.
|
|
373
|
+
Lang = { type = "String", global = true, accessor = "AsRef<str>" }
|
|
374
|
+
# The optional alternate text that describes the text (for example, if the text
|
|
375
|
+
# consists of a star symbol, the alt text should describe that in natural language).
|
|
376
|
+
AltText = { type = "String", global = true, accessor = "AsRef<str>" }
|
|
377
|
+
# The expanded form of an abbreviation.
|
|
378
|
+
# Only applicable if the content of the tag is an abbreviation.
|
|
379
|
+
Expanded = { type = "String", global = true, accessor = "AsRef<str>" }
|
|
380
|
+
# The actual text represented by the content of this tag, i.e. if it contained
|
|
381
|
+
# some curves that artistically represent some word. This should be the exact
|
|
382
|
+
# replacement text of the word.
|
|
383
|
+
ActualText = { type = "String", global = true, accessor = "AsRef<str>" }
|
|
384
|
+
# The title, characterizing a specific tag such as `"Chapter 1"`.
|
|
385
|
+
Title = { type = "String", accessor = "AsRef<str>" }
|
|
386
|
+
|
|
387
|
+
# The heading level
|
|
388
|
+
HeadingLevel = { name = "level", type = "NonZeroU16", accessor = "Copy" }
|
|
389
|
+
|
|
390
|
+
[Attr.List]
|
|
391
|
+
# The list numbering.
|
|
392
|
+
Numbering = { type = "ListNumbering", accessor = "Copy" }
|
|
393
|
+
|
|
394
|
+
[Attr.Table]
|
|
395
|
+
# The table summary.
|
|
396
|
+
Summary = { type = "String", accessor = "AsRef<str>" }
|
|
397
|
+
# The table header scope.
|
|
398
|
+
HeaderScope = { name = "scope", type = "TableHeaderScope", accessor = "Copy" }
|
|
399
|
+
# The list of headers associated with a table cell.
|
|
400
|
+
# Table data cells (`TD`) may specify a list of table headers (`TH`),
|
|
401
|
+
# which can also specify a list of parent header cells (`TH`), and so on.
|
|
402
|
+
# To determine the list of associated headers this list is recursively
|
|
403
|
+
# evaluated.
|
|
404
|
+
#
|
|
405
|
+
# This allows specifying header hierarchies inside tables.
|
|
406
|
+
CellHeaders = { name = "headers", type = "SmallVec<[TagId; 1]>", accessor = "Custom" }
|
|
407
|
+
# The row span of this table cell.
|
|
408
|
+
RowSpan = { type = "NonZeroU32", accessor = "Copy" }
|
|
409
|
+
# The column span of this table cell.
|
|
410
|
+
ColSpan = { type = "NonZeroU32", accessor = "Copy" }
|
|
411
|
+
|
|
412
|
+
[Attr.Layout]
|
|
413
|
+
# The placement.
|
|
414
|
+
Placement = { type = "Placement", global = true, accessor = "Copy" }
|
|
415
|
+
# The writing mode.
|
|
416
|
+
WritingMode = { type = "WritingMode", global = true, accessor = "Copy" }
|
|
417
|
+
# The bounding box of a tag that encloses its visible content.
|
|
418
|
+
# If the content spans multiple pages, this should be omitted.
|
|
419
|
+
BBox = { name = "bbox", type = "BBox", accessor = "Copy" }
|
|
420
|
+
# The width.
|
|
421
|
+
Width = { type = "f32", accessor = "Copy" }
|
|
422
|
+
# The height.
|
|
423
|
+
Height = { type = "f32", accessor = "Copy" }
|
|
424
|
+
# The background color.
|
|
425
|
+
BackgroundColor = { type = "NaiveRgbColor", global = true, accessor = "Copy" }
|
|
426
|
+
# The border color.
|
|
427
|
+
BorderColor = { type = "Sides<NaiveRgbColor>", global = true, accessor = "Copy" }
|
|
428
|
+
# The way the border is drawn.
|
|
429
|
+
BorderStyle = { type = "Sides<BorderStyle>", global = true, accessor = "Copy" }
|
|
430
|
+
# The border width.
|
|
431
|
+
BorderThickness = { type = "Sides<f32>", global = true, accessor = "Copy" }
|
|
432
|
+
# The padding inside of an element.
|
|
433
|
+
Padding = { type = "Sides<f32>", global = true, accessor = "Copy" }
|
|
434
|
+
# The color of text, borders, and text decorations.
|
|
435
|
+
Color = { type = "NaiveRgbColor", global = true, accessor = "Copy" }
|
|
436
|
+
# The spacing before the block-level element.
|
|
437
|
+
SpaceBefore = { type = "f32", accessor = "Copy" }
|
|
438
|
+
# The spacing after the block-level element.
|
|
439
|
+
SpaceAfter = { type = "f32", accessor = "Copy" }
|
|
440
|
+
# The spacing between the start inline edge of the element and the parent.
|
|
441
|
+
StartIndent = { type = "f32", accessor = "Copy" }
|
|
442
|
+
# The spacing between the end inline edge of the element and the parent.
|
|
443
|
+
EndIndent = { type = "f32", accessor = "Copy" }
|
|
444
|
+
# The amount the first line of text in a block-level element is indented. Only
|
|
445
|
+
# applicable to paragraph-like elements with non-block-level elements.
|
|
446
|
+
TextIndent = { type = "f32", accessor = "Copy" }
|
|
447
|
+
# The text alignment.
|
|
448
|
+
TextAlign = { type = "TextAlign", accessor = "Copy" }
|
|
449
|
+
# The alignment of block-level elements inside of this block-level element.
|
|
450
|
+
BlockAlign = { type = "BlockAlign", accessor = "Copy" }
|
|
451
|
+
# The alignment of inline-level elements inside of this block-level element.
|
|
452
|
+
InlineAlign = { type = "InlineAlign", accessor = "Copy" }
|
|
453
|
+
# The border style of table cells, overriding `BorderStyle`.
|
|
454
|
+
TableBorderStyle = { type = "Sides<BorderStyle>", accessor = "Copy" }
|
|
455
|
+
# The padding inside of table cells, overriding `Padding`.
|
|
456
|
+
TablePadding = { type = "Sides<f32>", accessor = "Copy" }
|
|
457
|
+
# The distance by which the baseline shall be shifted from the default position.
|
|
458
|
+
BaselineShift = { type = "f32", global = true, accessor = "Copy" }
|
|
459
|
+
# The height of each line in an element on the block axis.
|
|
460
|
+
LineHeight = { type = "LineHeight", global = true, accessor = "Copy" }
|
|
461
|
+
# The color of the text decoration, overriding the fill color.
|
|
462
|
+
TextDecorationColor = { type = "NaiveRgbColor", global = true, accessor = "Copy" }
|
|
463
|
+
# The width of the text decoration line.
|
|
464
|
+
TextDecorationThickness = { type = "f32", global = true, accessor = "Copy" }
|
|
465
|
+
# The kind of text decoration.
|
|
466
|
+
TextDecorationType = { type = "TextDecorationType", global = true, accessor = "Copy" }
|
|
467
|
+
# How the glyphs are rotated in a vertical writing mode.
|
|
468
|
+
GlyphOrientationVertical = { type = "GlyphOrientationVertical", global = true, accessor = "Copy" }
|
|
469
|
+
# The number of columns in the grouping element.
|
|
470
|
+
ColumnCount = { type = "NonZeroU32", accessor = "Copy" }
|
|
471
|
+
# The width of the gaps between columns in the grouping element.
|
|
472
|
+
ColumnGap = { type = "ColumnDimensions" }
|
|
473
|
+
# The width of the columns in the grouping element.
|
|
474
|
+
ColumnWidths = { type = "ColumnDimensions" }
|