blitz-pdf 0.1.1 → 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.
Files changed (114) hide show
  1. package/README.md +266 -12
  2. package/THIRD_PARTY_NOTICES.md +4 -2
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.d.ts.map +1 -1
  5. package/dist/document-options.d.ts +36 -0
  6. package/dist/document-options.d.ts.map +1 -0
  7. package/dist/document-options.js +236 -0
  8. package/dist/document-options.js.map +1 -0
  9. package/dist/node.d.ts +1 -1
  10. package/dist/node.d.ts.map +1 -1
  11. package/dist/options.d.ts +35 -1
  12. package/dist/options.d.ts.map +1 -1
  13. package/dist/options.js +21 -14
  14. package/dist/options.js.map +1 -1
  15. package/dist/types.d.ts +71 -1
  16. package/dist/types.d.ts.map +1 -1
  17. package/dist/validation.d.ts +2 -0
  18. package/dist/validation.d.ts.map +1 -0
  19. package/dist/validation.js +7 -0
  20. package/dist/validation.js.map +1 -0
  21. package/examples/zugferd.mjs +41 -0
  22. package/licenses/RUST_DEPENDENCIES.txt +27 -0
  23. package/package.json +3 -2
  24. package/src/browser.ts +1 -1
  25. package/src/document-options.ts +218 -0
  26. package/src/node.ts +1 -1
  27. package/src/options.ts +18 -13
  28. package/src/types.ts +76 -1
  29. package/src/validation.ts +6 -0
  30. package/vendor/README.md +27 -2
  31. package/vendor/krilla/.cargo-ok +1 -0
  32. package/vendor/krilla/.cargo_vcs_info.json +6 -0
  33. package/vendor/krilla/Cargo.lock +1357 -0
  34. package/vendor/krilla/Cargo.toml +165 -0
  35. package/vendor/krilla/LICENSE_APACHE +202 -0
  36. package/vendor/krilla/LICENSE_MIT +21 -0
  37. package/vendor/krilla/README.md +156 -0
  38. package/vendor/krilla/examples/basic.rs +117 -0
  39. package/vendor/krilla/examples/empty_document.rs +25 -0
  40. package/vendor/krilla/examples/parley.rs +174 -0
  41. package/vendor/krilla/examples/simple_text.rs +118 -0
  42. package/vendor/krilla/examples/stream_builder.rs +93 -0
  43. package/vendor/krilla/icc/LICENSE +116 -0
  44. package/vendor/krilla/icc/README.md +1 -0
  45. package/vendor/krilla/icc/sGrey-v2-magic.icc +0 -0
  46. package/vendor/krilla/icc/sGrey-v4.icc +0 -0
  47. package/vendor/krilla/icc/sRGB-v2-magic.icc +0 -0
  48. package/vendor/krilla/icc/sRGB-v4.icc +0 -0
  49. package/vendor/krilla/src/chunk_container.rs +503 -0
  50. package/vendor/krilla/src/configure/PDF_A1.md +227 -0
  51. package/vendor/krilla/src/configure/PDF_A2.md +269 -0
  52. package/vendor/krilla/src/configure/PDF_A3.md +31 -0
  53. package/vendor/krilla/src/configure/PDF_A4.md +211 -0
  54. package/vendor/krilla/src/configure/PDF_UA1.md +202 -0
  55. package/vendor/krilla/src/configure/README.md +23 -0
  56. package/vendor/krilla/src/configure/mod.rs +197 -0
  57. package/vendor/krilla/src/configure/validate.rs +1244 -0
  58. package/vendor/krilla/src/configure/version.rs +134 -0
  59. package/vendor/krilla/src/content.rs +1352 -0
  60. package/vendor/krilla/src/data.rs +49 -0
  61. package/vendor/krilla/src/document.rs +156 -0
  62. package/vendor/krilla/src/error.rs +170 -0
  63. package/vendor/krilla/src/geom.rs +341 -0
  64. package/vendor/krilla/src/graphics/blend.rs +46 -0
  65. package/vendor/krilla/src/graphics/color.rs +552 -0
  66. package/vendor/krilla/src/graphics/graphic.rs +30 -0
  67. package/vendor/krilla/src/graphics/graphics_state.rs +251 -0
  68. package/vendor/krilla/src/graphics/icc.rs +218 -0
  69. package/vendor/krilla/src/graphics/image.rs +835 -0
  70. package/vendor/krilla/src/graphics/mask.rs +128 -0
  71. package/vendor/krilla/src/graphics/mod.rs +14 -0
  72. package/vendor/krilla/src/graphics/paint.rs +434 -0
  73. package/vendor/krilla/src/graphics/separation.rs +86 -0
  74. package/vendor/krilla/src/graphics/shading_function.rs +865 -0
  75. package/vendor/krilla/src/graphics/shading_pattern.rs +60 -0
  76. package/vendor/krilla/src/graphics/tiling_pattern.rs +119 -0
  77. package/vendor/krilla/src/graphics/xobject.rs +150 -0
  78. package/vendor/krilla/src/interactive/action.rs +68 -0
  79. package/vendor/krilla/src/interactive/annotation.rs +283 -0
  80. package/vendor/krilla/src/interactive/destination.rs +289 -0
  81. package/vendor/krilla/src/interactive/mod.rs +3 -0
  82. package/vendor/krilla/src/interchange/embed.rs +240 -0
  83. package/vendor/krilla/src/interchange/metadata.rs +564 -0
  84. package/vendor/krilla/src/interchange/mod.rs +4 -0
  85. package/vendor/krilla/src/interchange/outline.rs +263 -0
  86. package/vendor/krilla/src/interchange/tagging/fmt.rs +733 -0
  87. package/vendor/krilla/src/interchange/tagging/generate.toml +474 -0
  88. package/vendor/krilla/src/interchange/tagging/generated.rs +4754 -0
  89. package/vendor/krilla/src/interchange/tagging/mod.rs +1324 -0
  90. package/vendor/krilla/src/interchange/tagging/tag.rs +686 -0
  91. package/vendor/krilla/src/lib.rs +179 -0
  92. package/vendor/krilla/src/num.rs +26 -0
  93. package/vendor/krilla/src/page.rs +612 -0
  94. package/vendor/krilla/src/pdf.rs +313 -0
  95. package/vendor/krilla/src/resource.rs +436 -0
  96. package/vendor/krilla/src/serialize.rs +1101 -0
  97. package/vendor/krilla/src/stream.rs +368 -0
  98. package/vendor/krilla/src/surface.rs +664 -0
  99. package/vendor/krilla/src/text/cid.rs +488 -0
  100. package/vendor/krilla/src/text/font.rs +351 -0
  101. package/vendor/krilla/src/text/glyph/bitmap.rs +81 -0
  102. package/vendor/krilla/src/text/glyph/colr.rs +581 -0
  103. package/vendor/krilla/src/text/glyph/mod.rs +205 -0
  104. package/vendor/krilla/src/text/glyph/outline.rs +72 -0
  105. package/vendor/krilla/src/text/glyph/svg.rs +34 -0
  106. package/vendor/krilla/src/text/group.rs +463 -0
  107. package/vendor/krilla/src/text/mod.rs +232 -0
  108. package/vendor/krilla/src/text/shape.rs +102 -0
  109. package/vendor/krilla/src/text/type3.rs +514 -0
  110. package/vendor/krilla/src/util.rs +286 -0
  111. package/vendor/stylo/properties/longhands.toml +0 -1
  112. package/vendor/stylo/stylesheets/rule_parser.rs +1 -1
  113. package/wasm/blitz_pdf.js +10 -5
  114. package/wasm/blitz_pdf_bg.wasm +0 -0
@@ -0,0 +1,227 @@
1
+ # Description
2
+ PDF/A-1 requires PDF version <= 1.4 and defines two conformance levels,
3
+ in the following order from less strict to more strict:
4
+ - Level B
5
+ - Level A
6
+
7
+ Level B is a subset of level A.
8
+
9
+ See `README.md` for the meaning of each color.
10
+
11
+ # Level B
12
+
13
+ ## 6.1 File structure
14
+
15
+ 6.1.2: `pdf-writer` always write the file header as described in the spec. Even if the
16
+ user enables `ascii_compatible`, we still write a binary header marker. 🟢
17
+
18
+ 6.1.3:
19
+ - We always set the file ID. 🟢
20
+ - We do not support encryption. 🔵
21
+ - We do not support linearization. 🔵
22
+
23
+ 6.1.4: `pdf-writer` always write the xref section as described in the spec. 🟢
24
+
25
+ 6.1.5: krilla ensures that the document information dictionary is consistent with
26
+ the XMP metadata. 🟢
27
+
28
+ 6.1.6: `pdf-writer` always writes hex strings
29
+ with an even number of characters and without whitespaces. 🟢
30
+
31
+ 6.1.7:
32
+ - `pdf-writer` always write streams as described in the spec. 🟢
33
+ - krilla does never write streams referencing external files. 🔵
34
+ - krilla does never use `LZWDecode` or `Crypt`. 🔵
35
+ - krilla never writes F, FFilter or FDecodeParams in streams. 🔵
36
+
37
+ 6.1.8: `pdf-writer` always writes indirect objects as described. 🟢
38
+
39
+ 6.1.9: krilla doesn't support linearization. 🔵
40
+
41
+ 6.1.10: krilla doesn't support `LZWDecode`. 🔵
42
+
43
+ 6.1.11: krilla forbids embedded files for this export mode. 🟢
44
+
45
+ 6.1.12:
46
+ - `pdf-writer` uses i32 for integers. 🟢
47
+ - krilla checks the that the maximum/minimum float number has not been exceeded. 🟢
48
+ - krilla does not round close real numbers to 0. 🟠
49
+ - krilla does not write at most 5 decimal places for real numbers. 🟠
50
+ - krilla always uses the `new_str` and `new_text_str` methods of the SerializeContext to create them,
51
+ which returns a validation error in case it's too long. 🔵
52
+ - krilla trims the names of fonts, and all other names cannot be longer than 127. 🔵
53
+ - krilla does check the maximum length of arrays. 🟢
54
+ - krilla does check the maximum entries of a dictionary. 🟢
55
+ - krilla fails export if more than 8388607 indirect objects exist. 🟢
56
+ - krilla fails export if a higher nesting-level than 28 exists. 🔵
57
+ - krilla does not use the DeviceN color space. 🟢
58
+ - krilla only uses u16 for CIDs. 🟢
59
+
60
+ 6.1.13: krilla does not support optional content. 🔵
61
+
62
+ ## 6.2 Graphics
63
+
64
+ 6.2.2:
65
+ - krilla always writes a valid output intent. 🟢
66
+ - krilla always only writes one output intent. 🟢
67
+
68
+ 6.2.3.1: krilla overrides the `no_device_cs` property if PDF/A is selected, and
69
+ in case CMYK is used but no profile was provided, export fails. 🟢
70
+
71
+ 6.2.3.2:
72
+ - sRGB/sGrey ICC profiles conform to ICC v2 specification. 🟢
73
+
74
+ 6.2.4.3:
75
+ - krilla always uses sRGB for RGB, and in addition also embeds an sRGB output intent. 🟢
76
+ - krilla always uses sGrey (except for encoding the alpha channel in images, where DeviceGray
77
+ is required), and in addition always embeds an output intent. 🟢
78
+ - krilla always uses an CMYK ICC profile, and always sets CMYK as the output intent. 🟢
79
+ It fails export if no CMYK ICC profile was provided. 🟢
80
+
81
+ 6.2.3.4:
82
+ - krilla ensures the Alternate space in Separation color spaces obeys the restrictions
83
+ in the applicable clauses 🟢
84
+ - krilla does not support DeviceN color spaces. 🔵
85
+
86
+ 6.2.4:
87
+ - krilla does not use the `Alternates`/`Intent` keys for images. 🔵
88
+ - krilla does check whether the `Interpolate` key is used. 🟢
89
+
90
+ 6.2.5: krilla does not use the `OPI`/`Subtype2`/`PS` keys for XObjects. 🔵
91
+
92
+ 6.2.6: krilla does not use reference XObjects. 🔵
93
+
94
+ 6.2.7: The spec only talks about PostScript XObjects, which we don't really use.
95
+ We only use PostScript functions. In any case, to be on the safe side, krilla fails exports
96
+ when a PostScript function is used. 🟢
97
+
98
+ 6.2.8: krilla does not use the transfer functions, halftones, TR/HTP/RI/FL keys. 🔵
99
+
100
+ 6.2.9: krilla does never define a rendering intent. 🔵
101
+
102
+ 6.2.10: krilla only uses operators defined in the reference and never uses BX/EX. 🔵
103
+
104
+ # 6.3 Fonts
105
+
106
+ 6.3.2: krilla follows the specification when defining fonts. 🟢
107
+
108
+ 6.3.3.1: krilla always writes the same Registry/Ordering for fonts. 🟢
109
+
110
+ 6.3.3.2: krilla always includes a `CIDToGIDMap` for Type2 CID fonts. 🟢
111
+
112
+ 6.3.3.3: krilla always writes the `WMode` entry for cmaps and never references any other ones. 🟢
113
+
114
+ 6.3.4:
115
+ - krilla embeds all fonts that are used. 🟢
116
+ - krilla checks the OpenType fsType field to ensure that fonts are legally embeddable. 🟢
117
+
118
+ 6.3.5:
119
+ - krilla doesn't support Type1 fonts and thus doesn't need the `CharSet` attribute. 🔵
120
+ - krilla always writes the `CIDSet` attribute. 🟢
121
+
122
+ 6.3.6: krilla always adds the `Widths` entry and makes them consistent to the font program. 🟢
123
+
124
+ 6.3.7: krilla only embeds CID fonts. 🔵
125
+
126
+
127
+ # 6.4 Transparency
128
+
129
+ - krilla forbids soft masks in this export mode. 🟢
130
+ - krilla forbids the S key in this export mode. 🟢
131
+ - krilla forbids non-default CA/ca/BM in this export mode. 🟢
132
+
133
+ ## 6.5 Annotations
134
+
135
+ 6.5.2: krilla does not support any non-standard annotation types, nor `FileAttachment`, `Sound` or `Movie`. 🔵
136
+
137
+ 6.5.3:
138
+ - krilla never sets the CA key of annotation dictionaries. 🔵
139
+ - krilla always sets the `F` flag for annotations. 🟢
140
+ - krilla does not support text annotations. 🔵
141
+ - krilla does not set the C key of annotations. 🔵
142
+ - krilla does never write an appearence dictionary. 🔵
143
+
144
+
145
+ ## 6.6 Action
146
+
147
+ 6.6.1:
148
+ - krilla does not support the `Launch`, `Sound`, `Movie`, `ResetForm`, `ImportData`, `Hide`,
149
+ `JavaScript` actions. 🔵
150
+ - krilla does not use the `set-state` and `no-op` actions. 🔵
151
+ - krilla does not support named actions. 🔵
152
+ - krilla does not support interactive forms. 🔵
153
+
154
+ 6.6.2:
155
+ - krilla does not support widget annotations. 🔵
156
+ - krilla does not write an AA entry in the document catalog. 🟢
157
+ - krilla does not write an AA entry for pages. 🟢
158
+
159
+ 6.6.3: -
160
+
161
+ ## 6.7 Metadata
162
+
163
+ 6.7.2:
164
+ - krilla overrides the `xmp_metadata` attribute for PDF/A exports so that it's always contained. 🟢
165
+ - `xmp-writer` always creates conforming XMP streams. 🟢
166
+ - We never apply a filter to the metadata stream dictionary.
167
+
168
+ 6.7.3:
169
+ - krilla ensures that XMP metadata and document info dictionary are consistent. 🟢
170
+ - Authors are encoded as a length-1 text array. 🟢
171
+ - krilla ensures consistency between PDF dates and XMP dates.
172
+
173
+ 6.7.4: Normalization is currently not checked.
174
+
175
+ 6.7.5: We never include the `bytes` or `encoding` attributes. 🟢
176
+
177
+ 6.7.6: krilla writes pdfaid:conformance and pdfaid:part as specified. 🟢
178
+
179
+ 6.7.7: krilla writes a minimal `xmpMM:History` entry when a creation date is
180
+ provided. 🟢
181
+
182
+ 6.7.8: krilla writes the extension schemas. 🟢
183
+
184
+ 6.7.9: `xmp-writer` always produces valid XMP packets. 🟢
185
+
186
+ 6.7.10: krilla doesn't use Type 0, Type 1 or TrueType fonts directly, thus no metadata needs to be provided. 🔵
187
+
188
+ 6.7.11: krilla writes the conformance level identification. 🟢
189
+
190
+ # Level A
191
+
192
+ 6.3.8: krilla always embeds a unicode character map. 🟢
193
+
194
+ # 6.8 Logical Structure
195
+
196
+ 6.8.2.1: General conformance to tagged PDF cannot be checked, but is documented. 🟣
197
+
198
+ 6.8.2.2: krilla always writes the mark info dictionary for this export mode. 🟢
199
+
200
+ 6.8.3.1: The need to specify artifacts is documented. 🟣
201
+
202
+ 6.8.3.2: The need to specify word boundaries is documented. 🟣
203
+
204
+ 6.8.3.3:
205
+ - The presence of a structure tree is enforced. 🟢
206
+ - The need to specify a granular structure hierarchy is documented. 🟣
207
+
208
+ 6.8.3.4: krilla maps all non-standard structure types. 🟢
209
+
210
+ 6.8.4:
211
+ - krilla requires the user to set the document language in that export mode. 🟢
212
+ - krilla allows users to specify the language on spans. 🟢
213
+ - The need for correctness of language tags is documented. 🟣
214
+
215
+ 6.8.5: The fact that an alternate text should be provided to figures and formulas is checked. 🟢
216
+
217
+ 6.8.6: krilla ensures that annotations have an alternate text. 🟢
218
+
219
+ 6.8.7: The requirement to specify replacement text is documented. 🟣
220
+
221
+ 6.8.8: The requirement to specify the expansions of abbreviations is documented. 🟣
222
+ NOTE: When inserting expansions of abbreviations, you must set them on the
223
+ leaf `SpanTag` struct passed to `Surface::start_tagged` method instead of the
224
+ `Tag` struct in the structure tree
225
+
226
+ # 6.9 Interactive Forms
227
+ krilla does not support interactive forms. 🔵
@@ -0,0 +1,269 @@
1
+ # Description
2
+ PDF/A-2 requires PDF version <= 1.7 and defines three conformance levels,
3
+ in the following order from less strict to more strict:
4
+ - Level B
5
+ - Level U
6
+ - Level A
7
+
8
+ Level U is a subset of level A, and level B is a subset of level U.
9
+
10
+ See `README.md` for the meaning of each color.
11
+
12
+ ## Level B
13
+
14
+ ## 6.1 File structure
15
+
16
+ 6.1.2: `pdf-writer` always write the file header as described in the spec. Even if the
17
+ user enables `ascii_compatible`, we still write a binary header marker. 🟢
18
+
19
+ 6.1.3:
20
+ - We always set the file ID. 🟢
21
+ - We do not support encryption. 🔵
22
+
23
+ 6.1.4: `pdf-writer` always write the xref section as described in the spec. 🟢
24
+
25
+ 6.1.5: -
26
+
27
+ 6.1.6: `pdf-writer` always writes hex strings with an even number of characters. 🟢
28
+
29
+ 6.1.7:
30
+ - `pdf-writer` always write streams as described in the spec. 🟢
31
+ - krilla does never write streams referencing external files. 🔵
32
+ - krilla does never use `LZWDecode` or `Crypt`. 🔵
33
+ - krilla never writes F, FFIlter or FDecodeParams in streams. 🔵
34
+
35
+ 6.1.8: krilla only ever writes UTF-8 strings as names. 🟢
36
+
37
+ 6.1.9: `pdf-writer` always writes indirect objects as described in the spec. 🟢
38
+
39
+ 6.1.10: krilla does never use inline image dictionaries. 🔵
40
+
41
+ 6.1.11: -
42
+
43
+ 6.1.12: krilla doesn't support permissions. 🔵
44
+
45
+ 6.1.13:
46
+ - `pdf-writer` uses i32 for integers. 🟢
47
+ - `pdf-writer` uses f32 for real numbers. 🟢
48
+ - krilla always uses the `new_str` and `new_text_str` methods of the SerializeContext to create them,
49
+ which returns a validation error in case it's too long. 🔵
50
+ - krilla trims the names of fonts, and all other names cannot be longer than 127. 🔵
51
+ - krilla fails export if more than 8388607 indirect objects exist. 🟢
52
+ - krilla fails export if a higher nesting-level than 28 exists. 🟢
53
+ - krilla does not use the DeviceN color space. 🟢
54
+ - krilla only uses u16 for CIDs. 🟢
55
+
56
+ ## 6.2 Graphics
57
+
58
+ 6.2.2:
59
+ - krilla doesn't use non-standard operators. 🟢
60
+ - krilla doesn't use the `ri` or `i` operator. 🟢
61
+ - krilla ensure that content stream has their own associated resource dictionary. 🟢
62
+
63
+ 6.2.3: krilla always write an `sRGB` output intent for PDF/A. 🟢
64
+
65
+ 6.2.4.1: krilla overrides the `no_device_cs` property if PDF/A is selected, and
66
+ in case CMYK is used but no profile was provided, export fails.
67
+
68
+ 6.2.4.2:
69
+ - sRGB/sGrey ICC profiles conform to ICC v4 specification. 🟢
70
+ - krilla does not support overprinting. 🔵
71
+
72
+ 6.2.4.3:
73
+ - krilla always uses sRGB for RGB, and in addition also embeds an sRGB output intent. 🟢
74
+ - krilla always uses sGrey (except for encoding the alpha channel in images, where DeviceGray
75
+ is required), and in addition always embeds an output intent. 🟢
76
+ - krilla always uses an CMYK ICC profile, and always sets CMYK as the output intent. 🟢
77
+ It fails export if no CMYK ICC profile was provided. 🟢
78
+
79
+ 6.2.4.4:
80
+ - krilla ensures the Alternate space in Separation color spaces obeys the restrictions
81
+ in the applicable clauses 🟢
82
+ - krilla does not support DeviceN color spaces. 🔵
83
+ - krilla fails export if a Separation colorant is associated with multiple different
84
+ fallback color spaces 🟢
85
+ - krilla manages the `tintTransform` function and will always write the same function for
86
+ the same color space 🟢
87
+
88
+ 6.2.4.5: Fulfilled because patterns are treated the same as all other elements in krilla. 🟢
89
+
90
+ 6.2.5: krilla does not use the transfer functions, halftones, TR/HTP/RI/FL keys. 🔵
91
+
92
+ 6.2.6: krilla does never define a rendering intent. 🔵
93
+
94
+ 6.2.7: krilla is not a reader. 🔵
95
+
96
+ 6.2.8.1:
97
+ - krilla does not use the `Alternates`/`Intent` keys for images. 🔵
98
+ - krilla does check whether the `Interpolate` key is used. 🟢
99
+
100
+ 6.2.8.2: krilla does not support thumbnails. 🔵
101
+
102
+ 6.2.8.3: krilla doesn't support JPEG2000 images. 🔵
103
+
104
+ 6.2.9.1: krilla does not use the `OPI`/`Subtype2`/`PS` keys for XObjects. 🔵
105
+
106
+ 6.2.9.2: krilla does not use reference XObjects. 🔵
107
+
108
+ 6.2.9.3: The spec only talks about PostScript XObjects, which we don't really use.
109
+ We only use PostScript functions. In any case, to be on the safe side, krilla fails exports
110
+ when a PostScript function is used. 🟢
111
+
112
+ 6.2.10: krilla always includes an OutputIntent for PDF/A, so the /G attribute is not
113
+ always required. 🟢
114
+
115
+ 6.2.11.1: krilla fails export in PDF/A when the .notdef glyph is referenced. 🟢
116
+
117
+ 6.2.11.2: krilla has made sure that the spec is followed in this regard. 🟢
118
+
119
+ 6.2.11.3.1: krilla always uses `Identity-H` as encoding. 🟢
120
+
121
+ 6.2.11.3.2: krilla always writes the `CIDToGidMap` entry. 🟢
122
+
123
+ 6.2.11.3.3: krilla always writes the `WMode` entry for cmaps and never references any other ones. 🟢
124
+
125
+ 6.2.11.4.1:
126
+ - krilla embeds all fonts that are used. 🟢
127
+ - krilla checks the OpenType fsType field to ensure that fonts are legally embeddable. 🟢
128
+
129
+ 6.2.11.4.2:
130
+ - krilla never writes the `CharSet` attribute. 🔵
131
+ - krilla always includes all CIDs in `CIDSet`. 🔵
132
+
133
+ 6.2.11.5: krilla copies the font metrics directly from the font. 🟢
134
+
135
+ 6.2.11.6:
136
+ - krilla embeds all fonts as symbolic. 🟢
137
+ - krilla does not write TrueType fonts directly. 🔵
138
+ - krilla only writes CIDFonts instead of TrueType fonts directly, so cmap is not needed. 🟢
139
+
140
+ 6.2.11.8: krilla fails export when the .notdef glyph is referenced. 🟢
141
+
142
+ ## 6.3 Annotations
143
+
144
+
145
+ 6.3.1: krilla does not support any non-standard annotation types, nor `3D`, `Sound`, `Screen` or `Movie`. 🔵
146
+
147
+ 6.3.2:
148
+ - krilla always sets the `F` flag for annotations. 🟢
149
+ - krilla does not support text annotations. 🔵
150
+
151
+ 6.3.3: krilla only supports the Link subtype for annotations, which doesn't require an appearence stream. 🔵
152
+
153
+ 6.3.4: -
154
+
155
+ ## 6.4 Interactive forms
156
+
157
+ 6.4.1: krilla does not support interactive forms. 🔵
158
+
159
+ 6.4.2: krilla does not support interactive forms. 🔵
160
+
161
+ 6.4.3: krilla does not support digital signatures. 🔵
162
+
163
+ ## 6.5 Action
164
+
165
+ 6.5.1:
166
+ - krilla does not support the `Launch`, `Sound`, `Movie`, `ResetForm`, `ImportData`, `Hide`, `SetOCGState`, `Rendition`, `Trans`,
167
+ `GoTo3DView` and `JavaScript` actions. 🔵
168
+ - krilla does not use the `set-state` and `no-op` actions. 🔵
169
+ - krilla does not support named actions. 🔵
170
+
171
+ 6.5.2:
172
+ - krilla does not support widget annotations. 🔵
173
+ - krilla does not write an AA entry in the document catalog. 🟢
174
+ - krilla does not write an AA entry for pages. 🟢
175
+
176
+ 6.5.3: -
177
+
178
+ ## 6.6 Metadata
179
+
180
+ 6.6.1: -
181
+
182
+ 6.6.2.1:
183
+ - krilla overrides the `xmp_metadata` attribute for PDF/A exports so that it's always contained. 🟢
184
+ - `xmp-writer` always creates conforming XMP streams. 🟢
185
+ - We never include the `bytes` or `encoding` attributes. 🟢
186
+
187
+ 6.6.2.2: -
188
+
189
+ 6.6.2.3.1: krilla doesn't use any non-standard properties. 🟢
190
+
191
+ 6.6.2.3.2: krilla writes the extension schemas. 🟢
192
+
193
+ 6.6.2.3.3: krilla writes the extension schemas. 🟢
194
+
195
+ 6.6.3: krilla ensures that XMP metadata and document info dictionary are consistent. 🟢
196
+
197
+ 6.6.4: krilla writes pdfaid:conformance and pdfaid:part as specified. 🟢
198
+
199
+ 6.6.5:
200
+ - krilla writes a document and instance ID. 🟢
201
+ - krilla writes a minimal `xmpMM:History` entry when a creation date is provided. 🟢
202
+
203
+ 6.6.6: krilla writes a minimal `xmpMM:History` entry when a creation date is
204
+ provided. 🟢
205
+
206
+ # 6.8 Embedding files
207
+
208
+ krilla prohibits embedding files in this export mode. 🟢
209
+
210
+ # 6.9 Optional content
211
+
212
+ krilla does not support optional content. 🔵
213
+
214
+ # 6.10 Use of alternate presentations and transitions
215
+
216
+ - krilla never writes `AlternatePresentations` in the name dictionary. 🔵
217
+ - krilla never writes `PresSteps` into page dictionaries. 🔵
218
+
219
+ # 6.11 Document requirements
220
+
221
+ krilla never writes the `Requirements` key in the document dictionary. 🔵
222
+
223
+ ## Level U
224
+
225
+ 6.2.11.7.1: -
226
+
227
+ 6.2.11.7.2:
228
+ - krilla always includes a `ToUnicode` mapping. 🟢
229
+ - For levels U and A, krilla checks that all glyphs have a codepoint mapping that
230
+ does not contain 0x0, 0xFEFF or 0xFFFE. 🟢
231
+
232
+
233
+ # Level A
234
+
235
+ 6.2.11.7.3: krilla forbids all codepoints in the unicode private area for this export mode. 🟢
236
+
237
+ # 6.7 Logical Structure
238
+
239
+ 6.7.1: -
240
+
241
+ 6.7.2.1: General conformance to tagged PDF cannot be checked, but is documented. 🟣
242
+
243
+ 6.7.2.2: krilla always writes the mark info dictionary for this export mode. 🟢
244
+
245
+ 6.7.3.1: The need to specify artifacts is documented. 🟣
246
+
247
+ 6.7.3.2: The need to specify word boundaries is documented. 🟣
248
+
249
+ 6.7.3.3:
250
+ - The presence of a structure tree is enforced. 🟢
251
+ - The need to specify a granular structure hierarchy is documented. 🟣
252
+
253
+ 6.7.3.4: krilla maps all non-standard structure types. 🟢
254
+
255
+ 6.7.4:
256
+ - krilla requires the user to set the document language in that export mode. 🟢
257
+ - krilla allows users to specify the language on spans. 🟢
258
+ - The need for correctness of language tags is documented. 🟣
259
+
260
+ 6.7.5: The fact that an alternate text should be provided to figures and formulas is checked. 🟢
261
+
262
+ 6.7.6: krilla ensures that annotations have an alternate text. 🟢
263
+
264
+ 6.7.7: The requirement to specify replacement text is documented. 🟣
265
+
266
+ 6.7.8: The requirement to specify the expansions of abbreviations is documented. 🟣
267
+ NOTE: When inserting expansions of abbreviations, you must set them on the
268
+ leaf `SpanTag` struct passed to `Surface::start_tagged` method instead of the
269
+ `Tag` struct in the structure tree
@@ -0,0 +1,31 @@
1
+ # Description
2
+ PDF/A-3 requires a PDF version <= 1.7 and defines three conformance levels,
3
+ in the following order from less strict to more strict:
4
+ - Level B
5
+ - Level U
6
+ - Level A
7
+
8
+ It is exactly the same as PDF/A-2, except for clause 6.8.
9
+
10
+ See `README.md` for the meaning of each subclause.
11
+
12
+ ## Level B
13
+
14
+ ## 6.8 Embedded files
15
+
16
+ - krilla allows embedded files in this export mode. 🟢
17
+ // TODO: Decide whether UF should be written for < PDF 1.7.
18
+ - krilla writes `F` and `AFRelationship` for embedded files, and writes `UF` for PDF 1.7
19
+ exports. 🟠
20
+ - krilla requires modification date, description and MIME subtype for embedded files in this
21
+ export mode. 🟢
22
+ - The fact that embedded file relationships should correctly describe the relationship to
23
+ the document is documented. 🟣
24
+
25
+ ## Level U
26
+
27
+ -
28
+
29
+ # Level A
30
+
31
+ -