@vaadin-component-factory/vcf-pdf-viewer 0.9.0 → 0.9.4

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 (174) hide show
  1. package/README.md +1 -1
  2. package/package.json +33 -18
  3. package/{src/display → pdfjs/dist}/display_utils.js +344 -139
  4. package/{src/display → pdfjs/dist}/fetch_stream.js +115 -97
  5. package/pdfjs/dist/get.js +1857 -0
  6. package/pdfjs/dist/index.js +767 -0
  7. package/pdfjs/dist/l10n_utils.js +140 -0
  8. package/{src/shared → pdfjs/dist}/message_handler.js +243 -259
  9. package/{src/display → pdfjs/dist}/network.js +149 -87
  10. package/{src/display/content_disposition.js → pdfjs/dist/network_utils.js} +167 -55
  11. package/{src/display → pdfjs/dist}/node_stream.js +133 -98
  12. package/pdfjs/dist/pdf.js +12778 -0
  13. package/pdfjs/dist/pdf_link_service.js +638 -0
  14. package/pdfjs/dist/pdf_rendering_queue.js +199 -0
  15. package/pdfjs/dist/pdf_thumbnail_viewer.js +819 -0
  16. package/pdfjs/dist/pdf_viewer.js +3598 -0
  17. package/pdfjs/dist/typeof.js +100 -0
  18. package/pdfjs/dist/ui_utils.js +1033 -0
  19. package/{src/shared → pdfjs/dist}/util.js +301 -287
  20. package/pdfjs/dist/worker.js +62813 -0
  21. package/src/vcf-pdf-viewer.js +77 -27
  22. package/theme/lumo/vcf-pdf-viewer-styles.js +1 -1
  23. package/theme/material/vcf-pdf-viewer.js +2 -2
  24. package/src/core/.eslintrc +0 -13
  25. package/src/core/annotation.js +0 -2948
  26. package/src/core/arithmetic_decoder.js +0 -182
  27. package/src/core/ascii_85_stream.js +0 -98
  28. package/src/core/ascii_hex_stream.js +0 -79
  29. package/src/core/base_stream.js +0 -110
  30. package/src/core/bidi.js +0 -438
  31. package/src/core/calibri_factors.js +0 -308
  32. package/src/core/catalog.js +0 -1459
  33. package/src/core/ccitt.js +0 -1062
  34. package/src/core/ccitt_stream.js +0 -60
  35. package/src/core/cff_font.js +0 -116
  36. package/src/core/cff_parser.js +0 -1949
  37. package/src/core/charsets.js +0 -119
  38. package/src/core/chunked_stream.js +0 -557
  39. package/src/core/cmap.js +0 -1039
  40. package/src/core/colorspace.js +0 -1533
  41. package/src/core/core_utils.js +0 -464
  42. package/src/core/crypto.js +0 -1900
  43. package/src/core/decode_stream.js +0 -170
  44. package/src/core/decrypt_stream.js +0 -59
  45. package/src/core/default_appearance.js +0 -99
  46. package/src/core/document.js +0 -1456
  47. package/src/core/encodings.js +0 -301
  48. package/src/core/evaluator.js +0 -4601
  49. package/src/core/file_spec.js +0 -108
  50. package/src/core/flate_stream.js +0 -402
  51. package/src/core/font_renderer.js +0 -882
  52. package/src/core/fonts.js +0 -3260
  53. package/src/core/fonts_utils.js +0 -221
  54. package/src/core/function.js +0 -1257
  55. package/src/core/glyf.js +0 -706
  56. package/src/core/glyphlist.js +0 -4558
  57. package/src/core/helvetica_factors.js +0 -353
  58. package/src/core/image.js +0 -802
  59. package/src/core/image_utils.js +0 -291
  60. package/src/core/jbig2.js +0 -2572
  61. package/src/core/jbig2_stream.js +0 -73
  62. package/src/core/jpeg_stream.js +0 -105
  63. package/src/core/jpg.js +0 -1416
  64. package/src/core/jpx.js +0 -2343
  65. package/src/core/jpx_stream.js +0 -87
  66. package/src/core/liberationsans_widths.js +0 -221
  67. package/src/core/lzw_stream.js +0 -150
  68. package/src/core/metadata_parser.js +0 -146
  69. package/src/core/metrics.js +0 -2970
  70. package/src/core/murmurhash3.js +0 -139
  71. package/src/core/myriadpro_factors.js +0 -290
  72. package/src/core/name_number_tree.js +0 -153
  73. package/src/core/object_loader.js +0 -149
  74. package/src/core/opentype_file_builder.js +0 -154
  75. package/src/core/operator_list.js +0 -734
  76. package/src/core/parser.js +0 -1416
  77. package/src/core/pattern.js +0 -985
  78. package/src/core/pdf_manager.js +0 -217
  79. package/src/core/predictor_stream.js +0 -238
  80. package/src/core/primitives.js +0 -402
  81. package/src/core/ps_parser.js +0 -272
  82. package/src/core/run_length_stream.js +0 -61
  83. package/src/core/segoeui_factors.js +0 -308
  84. package/src/core/standard_fonts.js +0 -817
  85. package/src/core/stream.js +0 -103
  86. package/src/core/struct_tree.js +0 -335
  87. package/src/core/to_unicode_map.js +0 -103
  88. package/src/core/type1_font.js +0 -421
  89. package/src/core/type1_parser.js +0 -776
  90. package/src/core/unicode.js +0 -1649
  91. package/src/core/worker.js +0 -848
  92. package/src/core/worker_stream.js +0 -135
  93. package/src/core/writer.js +0 -278
  94. package/src/core/xfa/bind.js +0 -652
  95. package/src/core/xfa/builder.js +0 -207
  96. package/src/core/xfa/config.js +0 -1926
  97. package/src/core/xfa/connection_set.js +0 -202
  98. package/src/core/xfa/data.js +0 -82
  99. package/src/core/xfa/datasets.js +0 -76
  100. package/src/core/xfa/factory.js +0 -111
  101. package/src/core/xfa/fonts.js +0 -181
  102. package/src/core/xfa/formcalc_lexer.js +0 -385
  103. package/src/core/xfa/formcalc_parser.js +0 -1340
  104. package/src/core/xfa/html_utils.js +0 -639
  105. package/src/core/xfa/layout.js +0 -383
  106. package/src/core/xfa/locale_set.js +0 -345
  107. package/src/core/xfa/namespaces.js +0 -81
  108. package/src/core/xfa/parser.js +0 -184
  109. package/src/core/xfa/setup.js +0 -38
  110. package/src/core/xfa/signature.js +0 -40
  111. package/src/core/xfa/som.js +0 -338
  112. package/src/core/xfa/stylesheet.js +0 -40
  113. package/src/core/xfa/template.js +0 -6260
  114. package/src/core/xfa/text.js +0 -290
  115. package/src/core/xfa/unknown.js +0 -29
  116. package/src/core/xfa/utils.js +0 -217
  117. package/src/core/xfa/xdp.js +0 -59
  118. package/src/core/xfa/xfa_object.js +0 -1130
  119. package/src/core/xfa/xhtml.js +0 -543
  120. package/src/core/xfa_fonts.js +0 -208
  121. package/src/core/xml_parser.js +0 -507
  122. package/src/core/xref.js +0 -899
  123. package/src/display/annotation_layer.js +0 -2107
  124. package/src/display/annotation_storage.js +0 -113
  125. package/src/display/api.js +0 -3292
  126. package/src/display/base_factory.js +0 -180
  127. package/src/display/canvas.js +0 -2828
  128. package/src/display/font_loader.js +0 -484
  129. package/src/display/metadata.js +0 -41
  130. package/src/display/network_utils.js +0 -100
  131. package/src/display/node_utils.js +0 -83
  132. package/src/display/optional_content_config.js +0 -189
  133. package/src/display/pattern_helper.js +0 -659
  134. package/src/display/svg.js +0 -1709
  135. package/src/display/text_layer.js +0 -847
  136. package/src/display/transport_stream.js +0 -303
  137. package/src/display/worker_options.js +0 -40
  138. package/src/display/xfa_layer.js +0 -204
  139. package/src/doc_helper.js +0 -25
  140. package/src/images/logo.svg +0 -41
  141. package/src/interfaces.js +0 -169
  142. package/src/license_header.js +0 -14
  143. package/src/license_header_libre.js +0 -21
  144. package/src/pdf.image_decoders.js +0 -46
  145. package/src/pdf.js +0 -146
  146. package/src/pdf.sandbox.external.js +0 -181
  147. package/src/pdf.sandbox.js +0 -151
  148. package/src/pdf.scripting.js +0 -25
  149. package/src/pdf.worker.entry.js +0 -19
  150. package/src/pdf.worker.js +0 -23
  151. package/src/scripting_api/aform.js +0 -608
  152. package/src/scripting_api/app.js +0 -621
  153. package/src/scripting_api/color.js +0 -129
  154. package/src/scripting_api/common.js +0 -58
  155. package/src/scripting_api/console.js +0 -38
  156. package/src/scripting_api/constants.js +0 -208
  157. package/src/scripting_api/doc.js +0 -1195
  158. package/src/scripting_api/error.js +0 -23
  159. package/src/scripting_api/event.js +0 -232
  160. package/src/scripting_api/field.js +0 -620
  161. package/src/scripting_api/fullscreen.js +0 -145
  162. package/src/scripting_api/initialization.js +0 -223
  163. package/src/scripting_api/pdf_object.js +0 -24
  164. package/src/scripting_api/print_params.js +0 -146
  165. package/src/scripting_api/proxy.js +0 -139
  166. package/src/scripting_api/thermometer.js +0 -69
  167. package/src/scripting_api/util.js +0 -581
  168. package/src/shared/.eslintrc +0 -13
  169. package/src/shared/cffStandardStrings.js +0 -311
  170. package/src/shared/compatibility.js +0 -114
  171. package/src/shared/fonts_utils.js +0 -429
  172. package/src/shared/is_node.js +0 -27
  173. package/src/shared/scripting_utils.js +0 -85
  174. package/src/worker_loader.js +0 -32
@@ -1,1926 +0,0 @@
1
- /* Copyright 2021 Mozilla Foundation
2
- *
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- import { $buildXFAObject, NamespaceIds } from "./namespaces.js";
17
- import {
18
- $content,
19
- $finalize,
20
- ContentObject,
21
- IntegerObject,
22
- Option01,
23
- Option10,
24
- OptionObject,
25
- StringObject,
26
- XFAObject,
27
- XFAObjectArray,
28
- } from "./xfa_object.js";
29
- import { getInteger, getStringOption } from "./utils.js";
30
- import { shadow, warn } from "../../shared/util.js";
31
-
32
- const CONFIG_NS_ID = NamespaceIds.config.id;
33
-
34
- class Acrobat extends XFAObject {
35
- constructor(attributes) {
36
- super(CONFIG_NS_ID, "acrobat", /* hasChildren = */ true);
37
- this.acrobat7 = null;
38
- this.autoSave = null;
39
- this.common = null;
40
- this.validate = null;
41
- this.validateApprovalSignatures = null;
42
- this.submitUrl = new XFAObjectArray();
43
- }
44
- }
45
-
46
- class Acrobat7 extends XFAObject {
47
- constructor(attributes) {
48
- super(CONFIG_NS_ID, "acrobat7", /* hasChildren = */ true);
49
- this.dynamicRender = null;
50
- }
51
- }
52
-
53
- class ADBE_JSConsole extends OptionObject {
54
- constructor(attributes) {
55
- super(CONFIG_NS_ID, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]);
56
- }
57
- }
58
-
59
- class ADBE_JSDebugger extends OptionObject {
60
- constructor(attributes) {
61
- super(CONFIG_NS_ID, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]);
62
- }
63
- }
64
-
65
- class AddSilentPrint extends Option01 {
66
- constructor(attributes) {
67
- super(CONFIG_NS_ID, "addSilentPrint");
68
- }
69
- }
70
-
71
- class AddViewerPreferences extends Option01 {
72
- constructor(attributes) {
73
- super(CONFIG_NS_ID, "addViewerPreferences");
74
- }
75
- }
76
-
77
- class AdjustData extends Option10 {
78
- constructor(attributes) {
79
- super(CONFIG_NS_ID, "adjustData");
80
- }
81
- }
82
-
83
- class AdobeExtensionLevel extends IntegerObject {
84
- constructor(attributes) {
85
- super(CONFIG_NS_ID, "adobeExtensionLevel", 0, n => n >= 1 && n <= 8);
86
- }
87
- }
88
-
89
- class Agent extends XFAObject {
90
- constructor(attributes) {
91
- super(CONFIG_NS_ID, "agent", /* hasChildren = */ true);
92
- this.name = attributes.name ? attributes.name.trim() : "";
93
- this.common = new XFAObjectArray();
94
- }
95
- }
96
-
97
- class AlwaysEmbed extends ContentObject {
98
- constructor(attributes) {
99
- super(CONFIG_NS_ID, "alwaysEmbed");
100
- }
101
- }
102
-
103
- class Amd extends StringObject {
104
- constructor(attributes) {
105
- super(CONFIG_NS_ID, "amd");
106
- }
107
- }
108
-
109
- class Area extends XFAObject {
110
- constructor(attributes) {
111
- super(CONFIG_NS_ID, "area");
112
- this.level = getInteger({
113
- data: attributes.level,
114
- defaultValue: 0,
115
- validate: n => n >= 1 && n <= 3,
116
- });
117
- this.name = getStringOption(attributes.name, [
118
- "",
119
- "barcode",
120
- "coreinit",
121
- "deviceDriver",
122
- "font",
123
- "general",
124
- "layout",
125
- "merge",
126
- "script",
127
- "signature",
128
- "sourceSet",
129
- "templateCache",
130
- ]);
131
- }
132
- }
133
-
134
- class Attributes extends OptionObject {
135
- constructor(attributes) {
136
- super(CONFIG_NS_ID, "attributes", ["preserve", "delegate", "ignore"]);
137
- }
138
- }
139
-
140
- class AutoSave extends OptionObject {
141
- constructor(attributes) {
142
- super(CONFIG_NS_ID, "autoSave", ["disabled", "enabled"]);
143
- }
144
- }
145
-
146
- class Base extends StringObject {
147
- constructor(attributes) {
148
- super(CONFIG_NS_ID, "base");
149
- }
150
- }
151
-
152
- class BatchOutput extends XFAObject {
153
- constructor(attributes) {
154
- super(CONFIG_NS_ID, "batchOutput");
155
- this.format = getStringOption(attributes.format, [
156
- "none",
157
- "concat",
158
- "zip",
159
- "zipCompress",
160
- ]);
161
- }
162
- }
163
-
164
- class BehaviorOverride extends ContentObject {
165
- constructor(attributes) {
166
- super(CONFIG_NS_ID, "behaviorOverride");
167
- }
168
-
169
- [$finalize]() {
170
- this[$content] = new Map(
171
- this[$content]
172
- .trim()
173
- .split(/\s+/)
174
- .filter(x => x.includes(":"))
175
- .map(x => x.split(":", 2))
176
- );
177
- }
178
- }
179
-
180
- class Cache extends XFAObject {
181
- constructor(attributes) {
182
- super(CONFIG_NS_ID, "cache", /* hasChildren = */ true);
183
- this.templateCache = null;
184
- }
185
- }
186
-
187
- class Change extends Option01 {
188
- constructor(attributes) {
189
- super(CONFIG_NS_ID, "change");
190
- }
191
- }
192
-
193
- class Common extends XFAObject {
194
- constructor(attributes) {
195
- super(CONFIG_NS_ID, "common", /* hasChildren = */ true);
196
- this.data = null;
197
- this.locale = null;
198
- this.localeSet = null;
199
- this.messaging = null;
200
- this.suppressBanner = null;
201
- this.template = null;
202
- this.validationMessaging = null;
203
- this.versionControl = null;
204
- this.log = new XFAObjectArray();
205
- }
206
- }
207
-
208
- class Compress extends XFAObject {
209
- constructor(attributes) {
210
- super(CONFIG_NS_ID, "compress");
211
- this.scope = getStringOption(attributes.scope, ["imageOnly", "document"]);
212
- }
213
- }
214
-
215
- class CompressLogicalStructure extends Option01 {
216
- constructor(attributes) {
217
- super(CONFIG_NS_ID, "compressLogicalStructure");
218
- }
219
- }
220
-
221
- class CompressObjectStream extends Option10 {
222
- constructor(attributes) {
223
- super(CONFIG_NS_ID, "compressObjectStream");
224
- }
225
- }
226
-
227
- class Compression extends XFAObject {
228
- constructor(attributes) {
229
- super(CONFIG_NS_ID, "compression", /* hasChildren = */ true);
230
- this.compressLogicalStructure = null;
231
- this.compressObjectStream = null;
232
- this.level = null;
233
- this.type = null;
234
- }
235
- }
236
-
237
- class Config extends XFAObject {
238
- constructor(attributes) {
239
- super(CONFIG_NS_ID, "config", /* hasChildren = */ true);
240
- this.acrobat = null;
241
- this.present = null;
242
- this.trace = null;
243
- this.agent = new XFAObjectArray();
244
- }
245
- }
246
-
247
- class Conformance extends OptionObject {
248
- constructor(attributes) {
249
- super(CONFIG_NS_ID, "conformance", ["A", "B"]);
250
- }
251
- }
252
-
253
- class ContentCopy extends Option01 {
254
- constructor(attributes) {
255
- super(CONFIG_NS_ID, "contentCopy");
256
- }
257
- }
258
-
259
- class Copies extends IntegerObject {
260
- constructor(attributes) {
261
- super(CONFIG_NS_ID, "copies", 1, n => n >= 1);
262
- }
263
- }
264
-
265
- class Creator extends StringObject {
266
- constructor(attributes) {
267
- super(CONFIG_NS_ID, "creator");
268
- }
269
- }
270
-
271
- class CurrentPage extends IntegerObject {
272
- constructor(attributes) {
273
- super(CONFIG_NS_ID, "currentPage", 0, n => n >= 0);
274
- }
275
- }
276
-
277
- class Data extends XFAObject {
278
- constructor(attributes) {
279
- super(CONFIG_NS_ID, "data", /* hasChildren = */ true);
280
- this.adjustData = null;
281
- this.attributes = null;
282
- this.incrementalLoad = null;
283
- this.outputXSL = null;
284
- this.range = null;
285
- this.record = null;
286
- this.startNode = null;
287
- this.uri = null;
288
- this.window = null;
289
- this.xsl = null;
290
- this.excludeNS = new XFAObjectArray();
291
- this.transform = new XFAObjectArray();
292
- }
293
- }
294
-
295
- class Debug extends XFAObject {
296
- constructor(attributes) {
297
- super(CONFIG_NS_ID, "debug", /* hasChildren = */ true);
298
- this.uri = null;
299
- }
300
- }
301
-
302
- class DefaultTypeface extends ContentObject {
303
- constructor(attributes) {
304
- super(CONFIG_NS_ID, "defaultTypeface");
305
- this.writingScript = getStringOption(attributes.writingScript, [
306
- "*",
307
- "Arabic",
308
- "Cyrillic",
309
- "EastEuropeanRoman",
310
- "Greek",
311
- "Hebrew",
312
- "Japanese",
313
- "Korean",
314
- "Roman",
315
- "SimplifiedChinese",
316
- "Thai",
317
- "TraditionalChinese",
318
- "Vietnamese",
319
- ]);
320
- }
321
- }
322
-
323
- class Destination extends OptionObject {
324
- constructor(attributes) {
325
- super(CONFIG_NS_ID, "destination", [
326
- "pdf",
327
- "pcl",
328
- "ps",
329
- "webClient",
330
- "zpl",
331
- ]);
332
- }
333
- }
334
-
335
- class DocumentAssembly extends Option01 {
336
- constructor(attributes) {
337
- super(CONFIG_NS_ID, "documentAssembly");
338
- }
339
- }
340
-
341
- class Driver extends XFAObject {
342
- constructor(attributes) {
343
- super(CONFIG_NS_ID, "driver", /* hasChildren = */ true);
344
- this.name = attributes.name ? attributes.name.trim() : "";
345
- this.fontInfo = null;
346
- this.xdc = null;
347
- }
348
- }
349
-
350
- class DuplexOption extends OptionObject {
351
- constructor(attributes) {
352
- super(CONFIG_NS_ID, "duplexOption", [
353
- "simplex",
354
- "duplexFlipLongEdge",
355
- "duplexFlipShortEdge",
356
- ]);
357
- }
358
- }
359
-
360
- class DynamicRender extends OptionObject {
361
- constructor(attributes) {
362
- super(CONFIG_NS_ID, "dynamicRender", ["forbidden", "required"]);
363
- }
364
- }
365
-
366
- class Embed extends Option01 {
367
- constructor(attributes) {
368
- super(CONFIG_NS_ID, "embed");
369
- }
370
- }
371
-
372
- class Encrypt extends Option01 {
373
- constructor(attributes) {
374
- super(CONFIG_NS_ID, "encrypt");
375
- }
376
- }
377
-
378
- class Encryption extends XFAObject {
379
- constructor(attributes) {
380
- super(CONFIG_NS_ID, "encryption", /* hasChildren = */ true);
381
- this.encrypt = null;
382
- this.encryptionLevel = null;
383
- this.permissions = null;
384
- }
385
- }
386
-
387
- class EncryptionLevel extends OptionObject {
388
- constructor(attributes) {
389
- super(CONFIG_NS_ID, "encryptionLevel", ["40bit", "128bit"]);
390
- }
391
- }
392
-
393
- class Enforce extends StringObject {
394
- constructor(attributes) {
395
- super(CONFIG_NS_ID, "enforce");
396
- }
397
- }
398
-
399
- class Equate extends XFAObject {
400
- constructor(attributes) {
401
- super(CONFIG_NS_ID, "equate");
402
-
403
- this.force = getInteger({
404
- data: attributes.force,
405
- defaultValue: 1,
406
- validate: n => n === 0,
407
- });
408
-
409
- this.from = attributes.from || "";
410
- this.to = attributes.to || "";
411
- }
412
- }
413
-
414
- class EquateRange extends XFAObject {
415
- constructor(attributes) {
416
- super(CONFIG_NS_ID, "equateRange");
417
-
418
- this.from = attributes.from || "";
419
- this.to = attributes.to || "";
420
- this._unicodeRange = attributes.unicodeRange || "";
421
- }
422
-
423
- get unicodeRange() {
424
- const ranges = [];
425
- const unicodeRegex = /U\+([0-9a-fA-F]+)/;
426
- const unicodeRange = this._unicodeRange;
427
- for (let range of unicodeRange
428
- .split(",")
429
- .map(x => x.trim())
430
- .filter(x => !!x)) {
431
- range = range.split("-", 2).map(x => {
432
- const found = x.match(unicodeRegex);
433
- if (!found) {
434
- return 0;
435
- }
436
- return parseInt(found[1], 16);
437
- });
438
- if (range.length === 1) {
439
- range.push(range[0]);
440
- }
441
- ranges.push(range);
442
- }
443
- return shadow(this, "unicodeRange", ranges);
444
- }
445
- }
446
-
447
- class Exclude extends ContentObject {
448
- constructor(attributes) {
449
- super(CONFIG_NS_ID, "exclude");
450
- }
451
-
452
- [$finalize]() {
453
- this[$content] = this[$content]
454
- .trim()
455
- .split(/\s+/)
456
- .filter(
457
- x =>
458
- x &&
459
- [
460
- "calculate",
461
- "close",
462
- "enter",
463
- "exit",
464
- "initialize",
465
- "ready",
466
- "validate",
467
- ].includes(x)
468
- );
469
- }
470
- }
471
-
472
- class ExcludeNS extends StringObject {
473
- constructor(attributes) {
474
- super(CONFIG_NS_ID, "excludeNS");
475
- }
476
- }
477
-
478
- class FlipLabel extends OptionObject {
479
- constructor(attributes) {
480
- super(CONFIG_NS_ID, "flipLabel", ["usePrinterSetting", "on", "off"]);
481
- }
482
- }
483
-
484
- class FontInfo extends XFAObject {
485
- constructor(attributes) {
486
- super(CONFIG_NS_ID, "fontInfo", /* hasChildren = */ true);
487
- this.embed = null;
488
- this.map = null;
489
- this.subsetBelow = null;
490
- this.alwaysEmbed = new XFAObjectArray();
491
- this.defaultTypeface = new XFAObjectArray();
492
- this.neverEmbed = new XFAObjectArray();
493
- }
494
- }
495
-
496
- class FormFieldFilling extends Option01 {
497
- constructor(attributes) {
498
- super(CONFIG_NS_ID, "formFieldFilling");
499
- }
500
- }
501
-
502
- class GroupParent extends StringObject {
503
- constructor(attributes) {
504
- super(CONFIG_NS_ID, "groupParent");
505
- }
506
- }
507
-
508
- class IfEmpty extends OptionObject {
509
- constructor(attributes) {
510
- super(CONFIG_NS_ID, "ifEmpty", [
511
- "dataValue",
512
- "dataGroup",
513
- "ignore",
514
- "remove",
515
- ]);
516
- }
517
- }
518
-
519
- class IncludeXDPContent extends StringObject {
520
- constructor(attributes) {
521
- super(CONFIG_NS_ID, "includeXDPContent");
522
- }
523
- }
524
-
525
- class IncrementalLoad extends OptionObject {
526
- constructor(attributes) {
527
- super(CONFIG_NS_ID, "incrementalLoad", ["none", "forwardOnly"]);
528
- }
529
- }
530
-
531
- class IncrementalMerge extends Option01 {
532
- constructor(attributes) {
533
- super(CONFIG_NS_ID, "incrementalMerge");
534
- }
535
- }
536
-
537
- class Interactive extends Option01 {
538
- constructor(attributes) {
539
- super(CONFIG_NS_ID, "interactive");
540
- }
541
- }
542
-
543
- class Jog extends OptionObject {
544
- constructor(attributes) {
545
- super(CONFIG_NS_ID, "jog", ["usePrinterSetting", "none", "pageSet"]);
546
- }
547
- }
548
-
549
- class LabelPrinter extends XFAObject {
550
- constructor(attributes) {
551
- super(CONFIG_NS_ID, "labelPrinter", /* hasChildren = */ true);
552
- this.name = getStringOption(attributes.name, ["zpl", "dpl", "ipl", "tcpl"]);
553
- this.batchOutput = null;
554
- this.flipLabel = null;
555
- this.fontInfo = null;
556
- this.xdc = null;
557
- }
558
- }
559
-
560
- class Layout extends OptionObject {
561
- constructor(attributes) {
562
- super(CONFIG_NS_ID, "layout", ["paginate", "panel"]);
563
- }
564
- }
565
-
566
- class Level extends IntegerObject {
567
- constructor(attributes) {
568
- super(CONFIG_NS_ID, "level", 0, n => n > 0);
569
- }
570
- }
571
-
572
- class Linearized extends Option01 {
573
- constructor(attributes) {
574
- super(CONFIG_NS_ID, "linearized");
575
- }
576
- }
577
-
578
- class Locale extends StringObject {
579
- constructor(attributes) {
580
- super(CONFIG_NS_ID, "locale");
581
- }
582
- }
583
-
584
- class LocaleSet extends StringObject {
585
- constructor(attributes) {
586
- super(CONFIG_NS_ID, "localeSet");
587
- }
588
- }
589
-
590
- class Log extends XFAObject {
591
- constructor(attributes) {
592
- super(CONFIG_NS_ID, "log", /* hasChildren = */ true);
593
- this.mode = null;
594
- this.threshold = null;
595
- this.to = null;
596
- this.uri = null;
597
- }
598
- }
599
-
600
- // Renamed in MapElement to avoid confusion with usual js Map.
601
- class MapElement extends XFAObject {
602
- constructor(attributes) {
603
- super(CONFIG_NS_ID, "map", /* hasChildren = */ true);
604
- this.equate = new XFAObjectArray();
605
- this.equateRange = new XFAObjectArray();
606
- }
607
- }
608
-
609
- class MediumInfo extends XFAObject {
610
- constructor(attributes) {
611
- super(CONFIG_NS_ID, "mediumInfo", /* hasChildren = */ true);
612
- this.map = null;
613
- }
614
- }
615
-
616
- class Message extends XFAObject {
617
- constructor(attributes) {
618
- super(CONFIG_NS_ID, "message", /* hasChildren = */ true);
619
- this.msgId = null;
620
- this.severity = null;
621
- }
622
- }
623
-
624
- class Messaging extends XFAObject {
625
- constructor(attributes) {
626
- super(CONFIG_NS_ID, "messaging", /* hasChildren = */ true);
627
- this.message = new XFAObjectArray();
628
- }
629
- }
630
-
631
- class Mode extends OptionObject {
632
- constructor(attributes) {
633
- super(CONFIG_NS_ID, "mode", ["append", "overwrite"]);
634
- }
635
- }
636
-
637
- class ModifyAnnots extends Option01 {
638
- constructor(attributes) {
639
- super(CONFIG_NS_ID, "modifyAnnots");
640
- }
641
- }
642
-
643
- class MsgId extends IntegerObject {
644
- constructor(attributes) {
645
- super(CONFIG_NS_ID, "msgId", 1, n => n >= 1);
646
- }
647
- }
648
-
649
- class NameAttr extends StringObject {
650
- constructor(attributes) {
651
- super(CONFIG_NS_ID, "nameAttr");
652
- }
653
- }
654
-
655
- class NeverEmbed extends ContentObject {
656
- constructor(attributes) {
657
- super(CONFIG_NS_ID, "neverEmbed");
658
- }
659
- }
660
-
661
- class NumberOfCopies extends IntegerObject {
662
- constructor(attributes) {
663
- super(CONFIG_NS_ID, "numberOfCopies", null, n => n >= 2 && n <= 5);
664
- }
665
- }
666
-
667
- class OpenAction extends XFAObject {
668
- constructor(attributes) {
669
- super(CONFIG_NS_ID, "openAction", /* hasChildren = */ true);
670
- this.destination = null;
671
- }
672
- }
673
-
674
- class Output extends XFAObject {
675
- constructor(attributes) {
676
- super(CONFIG_NS_ID, "output", /* hasChildren = */ true);
677
- this.to = null;
678
- this.type = null;
679
- this.uri = null;
680
- }
681
- }
682
-
683
- class OutputBin extends StringObject {
684
- constructor(attributes) {
685
- super(CONFIG_NS_ID, "outputBin");
686
- }
687
- }
688
-
689
- class OutputXSL extends XFAObject {
690
- constructor(attributes) {
691
- super(CONFIG_NS_ID, "outputXSL", /* hasChildren = */ true);
692
- this.uri = null;
693
- }
694
- }
695
-
696
- class Overprint extends OptionObject {
697
- constructor(attributes) {
698
- super(CONFIG_NS_ID, "overprint", ["none", "both", "draw", "field"]);
699
- }
700
- }
701
-
702
- class Packets extends StringObject {
703
- constructor(attributes) {
704
- super(CONFIG_NS_ID, "packets");
705
- }
706
-
707
- [$finalize]() {
708
- if (this[$content] === "*") {
709
- return;
710
- }
711
- this[$content] = this[$content]
712
- .trim()
713
- .split(/\s+/)
714
- .filter(x =>
715
- ["config", "datasets", "template", "xfdf", "xslt"].includes(x)
716
- );
717
- }
718
- }
719
-
720
- class PageOffset extends XFAObject {
721
- constructor(attributes) {
722
- super(CONFIG_NS_ID, "pageOffset");
723
- this.x = getInteger({
724
- data: attributes.x,
725
- defaultValue: "useXDCSetting",
726
- validate: n => true,
727
- });
728
- this.y = getInteger({
729
- data: attributes.y,
730
- defaultValue: "useXDCSetting",
731
- validate: n => true,
732
- });
733
- }
734
- }
735
-
736
- class PageRange extends StringObject {
737
- constructor(attributes) {
738
- super(CONFIG_NS_ID, "pageRange");
739
- }
740
-
741
- [$finalize]() {
742
- const numbers = this[$content]
743
- .trim()
744
- .split(/\s+/)
745
- .map(x => parseInt(x, 10));
746
- const ranges = [];
747
- for (let i = 0, ii = numbers.length; i < ii; i += 2) {
748
- ranges.push(numbers.slice(i, i + 2));
749
- }
750
- this[$content] = ranges;
751
- }
752
- }
753
-
754
- class Pagination extends OptionObject {
755
- constructor(attributes) {
756
- super(CONFIG_NS_ID, "pagination", [
757
- "simplex",
758
- "duplexShortEdge",
759
- "duplexLongEdge",
760
- ]);
761
- }
762
- }
763
-
764
- class PaginationOverride extends OptionObject {
765
- constructor(attributes) {
766
- super(CONFIG_NS_ID, "paginationOverride", [
767
- "none",
768
- "forceDuplex",
769
- "forceDuplexLongEdge",
770
- "forceDuplexShortEdge",
771
- "forceSimplex",
772
- ]);
773
- }
774
- }
775
-
776
- class Part extends IntegerObject {
777
- constructor(attributes) {
778
- super(CONFIG_NS_ID, "part", 1, n => false);
779
- }
780
- }
781
-
782
- class Pcl extends XFAObject {
783
- constructor(attributes) {
784
- super(CONFIG_NS_ID, "pcl", /* hasChildren = */ true);
785
- this.name = attributes.name || "";
786
- this.batchOutput = null;
787
- this.fontInfo = null;
788
- this.jog = null;
789
- this.mediumInfo = null;
790
- this.outputBin = null;
791
- this.pageOffset = null;
792
- this.staple = null;
793
- this.xdc = null;
794
- }
795
- }
796
-
797
- class Pdf extends XFAObject {
798
- constructor(attributes) {
799
- super(CONFIG_NS_ID, "pdf", /* hasChildren = */ true);
800
- this.name = attributes.name || "";
801
- this.adobeExtensionLevel = null;
802
- this.batchOutput = null;
803
- this.compression = null;
804
- this.creator = null;
805
- this.encryption = null;
806
- this.fontInfo = null;
807
- this.interactive = null;
808
- this.linearized = null;
809
- this.openAction = null;
810
- this.pdfa = null;
811
- this.producer = null;
812
- this.renderPolicy = null;
813
- this.scriptModel = null;
814
- this.silentPrint = null;
815
- this.submitFormat = null;
816
- this.tagged = null;
817
- this.version = null;
818
- this.viewerPreferences = null;
819
- this.xdc = null;
820
- }
821
- }
822
-
823
- class Pdfa extends XFAObject {
824
- constructor(attributes) {
825
- super(CONFIG_NS_ID, "pdfa", /* hasChildren = */ true);
826
- this.amd = null;
827
- this.conformance = null;
828
- this.includeXDPContent = null;
829
- this.part = null;
830
- }
831
- }
832
-
833
- class Permissions extends XFAObject {
834
- constructor(attributes) {
835
- super(CONFIG_NS_ID, "permissions", /* hasChildren = */ true);
836
- this.accessibleContent = null;
837
- this.change = null;
838
- this.contentCopy = null;
839
- this.documentAssembly = null;
840
- this.formFieldFilling = null;
841
- this.modifyAnnots = null;
842
- this.plaintextMetadata = null;
843
- this.print = null;
844
- this.printHighQuality = null;
845
- }
846
- }
847
-
848
- class PickTrayByPDFSize extends Option01 {
849
- constructor(attributes) {
850
- super(CONFIG_NS_ID, "pickTrayByPDFSize");
851
- }
852
- }
853
-
854
- class Picture extends StringObject {
855
- constructor(attributes) {
856
- super(CONFIG_NS_ID, "picture");
857
- }
858
-
859
- // TODO: check the validity of the picture clause.
860
- // See page 1150 in the spec.
861
- }
862
-
863
- class PlaintextMetadata extends Option01 {
864
- constructor(attributes) {
865
- super(CONFIG_NS_ID, "plaintextMetadata");
866
- }
867
- }
868
-
869
- class Presence extends OptionObject {
870
- constructor(attributes) {
871
- super(CONFIG_NS_ID, "presence", [
872
- "preserve",
873
- "dissolve",
874
- "dissolveStructure",
875
- "ignore",
876
- "remove",
877
- ]);
878
- }
879
- }
880
-
881
- class Present extends XFAObject {
882
- constructor(attributes) {
883
- super(CONFIG_NS_ID, "present", /* hasChildren = */ true);
884
- this.behaviorOverride = null;
885
- this.cache = null;
886
- this.common = null;
887
- this.copies = null;
888
- this.destination = null;
889
- this.incrementalMerge = null;
890
- this.layout = null;
891
- this.output = null;
892
- this.overprint = null;
893
- this.pagination = null;
894
- this.paginationOverride = null;
895
- this.script = null;
896
- this.validate = null;
897
- this.xdp = null;
898
- this.driver = new XFAObjectArray();
899
- this.labelPrinter = new XFAObjectArray();
900
- this.pcl = new XFAObjectArray();
901
- this.pdf = new XFAObjectArray();
902
- this.ps = new XFAObjectArray();
903
- this.submitUrl = new XFAObjectArray();
904
- this.webClient = new XFAObjectArray();
905
- this.zpl = new XFAObjectArray();
906
- }
907
- }
908
-
909
- class Print extends Option01 {
910
- constructor(attributes) {
911
- super(CONFIG_NS_ID, "print");
912
- }
913
- }
914
-
915
- class PrintHighQuality extends Option01 {
916
- constructor(attributes) {
917
- super(CONFIG_NS_ID, "printHighQuality");
918
- }
919
- }
920
-
921
- class PrintScaling extends OptionObject {
922
- constructor(attributes) {
923
- super(CONFIG_NS_ID, "printScaling", ["appdefault", "noScaling"]);
924
- }
925
- }
926
-
927
- class PrinterName extends StringObject {
928
- constructor(attributes) {
929
- super(CONFIG_NS_ID, "printerName");
930
- }
931
- }
932
-
933
- class Producer extends StringObject {
934
- constructor(attributes) {
935
- super(CONFIG_NS_ID, "producer");
936
- }
937
- }
938
-
939
- class Ps extends XFAObject {
940
- constructor(attributes) {
941
- super(CONFIG_NS_ID, "ps", /* hasChildren = */ true);
942
- this.name = attributes.name || "";
943
- this.batchOutput = null;
944
- this.fontInfo = null;
945
- this.jog = null;
946
- this.mediumInfo = null;
947
- this.outputBin = null;
948
- this.staple = null;
949
- this.xdc = null;
950
- }
951
- }
952
-
953
- class Range extends ContentObject {
954
- constructor(attributes) {
955
- super(CONFIG_NS_ID, "range");
956
- }
957
-
958
- [$finalize]() {
959
- this[$content] = this[$content]
960
- .trim()
961
- .split(/\s*,\s*/, 2)
962
- .map(range => range.split("-").map(x => parseInt(x.trim(), 10)))
963
- .filter(range => range.every(x => !isNaN(x)))
964
- .map(range => {
965
- if (range.length === 1) {
966
- range.push(range[0]);
967
- }
968
- return range;
969
- });
970
- }
971
- }
972
-
973
- class Record extends ContentObject {
974
- constructor(attributes) {
975
- super(CONFIG_NS_ID, "record");
976
- }
977
-
978
- [$finalize]() {
979
- this[$content] = this[$content].trim();
980
- const n = parseInt(this[$content], 10);
981
- if (!isNaN(n) && n >= 0) {
982
- this[$content] = n;
983
- }
984
- }
985
- }
986
-
987
- class Relevant extends ContentObject {
988
- constructor(attributes) {
989
- super(CONFIG_NS_ID, "relevant");
990
- }
991
-
992
- [$finalize]() {
993
- this[$content] = this[$content].trim().split(/\s+/);
994
- }
995
- }
996
-
997
- class Rename extends ContentObject {
998
- constructor(attributes) {
999
- super(CONFIG_NS_ID, "rename");
1000
- }
1001
-
1002
- [$finalize]() {
1003
- this[$content] = this[$content].trim();
1004
- // String must be a XFA name: same as XML one except that there
1005
- // is no colon.
1006
- if (
1007
- this[$content].toLowerCase().startsWith("xml") ||
1008
- this[$content].match(new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u"))
1009
- ) {
1010
- warn("XFA - Rename: invalid XFA name");
1011
- }
1012
- }
1013
- }
1014
-
1015
- class RenderPolicy extends OptionObject {
1016
- constructor(attributes) {
1017
- super(CONFIG_NS_ID, "renderPolicy", ["server", "client"]);
1018
- }
1019
- }
1020
-
1021
- class RunScripts extends OptionObject {
1022
- constructor(attributes) {
1023
- super(CONFIG_NS_ID, "runScripts", ["both", "client", "none", "server"]);
1024
- }
1025
- }
1026
-
1027
- class Script extends XFAObject {
1028
- constructor(attributes) {
1029
- super(CONFIG_NS_ID, "script", /* hasChildren = */ true);
1030
- this.currentPage = null;
1031
- this.exclude = null;
1032
- this.runScripts = null;
1033
- }
1034
- }
1035
-
1036
- class ScriptModel extends OptionObject {
1037
- constructor(attributes) {
1038
- super(CONFIG_NS_ID, "scriptModel", ["XFA", "none"]);
1039
- }
1040
- }
1041
-
1042
- class Severity extends OptionObject {
1043
- constructor(attributes) {
1044
- super(CONFIG_NS_ID, "severity", [
1045
- "ignore",
1046
- "error",
1047
- "information",
1048
- "trace",
1049
- "warning",
1050
- ]);
1051
- }
1052
- }
1053
-
1054
- class SilentPrint extends XFAObject {
1055
- constructor(attributes) {
1056
- super(CONFIG_NS_ID, "silentPrint", /* hasChildren = */ true);
1057
- this.addSilentPrint = null;
1058
- this.printerName = null;
1059
- }
1060
- }
1061
-
1062
- class Staple extends XFAObject {
1063
- constructor(attributes) {
1064
- super(CONFIG_NS_ID, "staple");
1065
- this.mode = getStringOption(attributes.mode, [
1066
- "usePrinterSetting",
1067
- "on",
1068
- "off",
1069
- ]);
1070
- }
1071
- }
1072
-
1073
- class StartNode extends StringObject {
1074
- constructor(attributes) {
1075
- super(CONFIG_NS_ID, "startNode");
1076
- }
1077
- }
1078
-
1079
- class StartPage extends IntegerObject {
1080
- constructor(attributes) {
1081
- super(CONFIG_NS_ID, "startPage", 0, n => true);
1082
- }
1083
- }
1084
-
1085
- class SubmitFormat extends OptionObject {
1086
- constructor(attributes) {
1087
- super(CONFIG_NS_ID, "submitFormat", [
1088
- "html",
1089
- "delegate",
1090
- "fdf",
1091
- "xml",
1092
- "pdf",
1093
- ]);
1094
- }
1095
- }
1096
-
1097
- class SubmitUrl extends StringObject {
1098
- constructor(attributes) {
1099
- super(CONFIG_NS_ID, "submitUrl");
1100
- }
1101
- }
1102
-
1103
- class SubsetBelow extends IntegerObject {
1104
- constructor(attributes) {
1105
- super(CONFIG_NS_ID, "subsetBelow", 100, n => n >= 0 && n <= 100);
1106
- }
1107
- }
1108
-
1109
- class SuppressBanner extends Option01 {
1110
- constructor(attributes) {
1111
- super(CONFIG_NS_ID, "suppressBanner");
1112
- }
1113
- }
1114
-
1115
- class Tagged extends Option01 {
1116
- constructor(attributes) {
1117
- super(CONFIG_NS_ID, "tagged");
1118
- }
1119
- }
1120
-
1121
- class Template extends XFAObject {
1122
- constructor(attributes) {
1123
- super(CONFIG_NS_ID, "template", /* hasChildren = */ true);
1124
- this.base = null;
1125
- this.relevant = null;
1126
- this.startPage = null;
1127
- this.uri = null;
1128
- this.xsl = null;
1129
- }
1130
- }
1131
-
1132
- class Threshold extends OptionObject {
1133
- constructor(attributes) {
1134
- super(CONFIG_NS_ID, "threshold", [
1135
- "trace",
1136
- "error",
1137
- "information",
1138
- "warning",
1139
- ]);
1140
- }
1141
- }
1142
-
1143
- class To extends OptionObject {
1144
- constructor(attributes) {
1145
- super(CONFIG_NS_ID, "to", [
1146
- "null",
1147
- "memory",
1148
- "stderr",
1149
- "stdout",
1150
- "system",
1151
- "uri",
1152
- ]);
1153
- }
1154
- }
1155
-
1156
- class TemplateCache extends XFAObject {
1157
- constructor(attributes) {
1158
- super(CONFIG_NS_ID, "templateCache");
1159
- this.maxEntries = getInteger({
1160
- data: attributes.maxEntries,
1161
- defaultValue: 5,
1162
- validate: n => n >= 0,
1163
- });
1164
- }
1165
- }
1166
-
1167
- class Trace extends XFAObject {
1168
- constructor(attributes) {
1169
- super(CONFIG_NS_ID, "trace", /* hasChildren = */ true);
1170
- this.area = new XFAObjectArray();
1171
- }
1172
- }
1173
-
1174
- class Transform extends XFAObject {
1175
- constructor(attributes) {
1176
- super(CONFIG_NS_ID, "transform", /* hasChildren = */ true);
1177
- this.groupParent = null;
1178
- this.ifEmpty = null;
1179
- this.nameAttr = null;
1180
- this.picture = null;
1181
- this.presence = null;
1182
- this.rename = null;
1183
- this.whitespace = null;
1184
- }
1185
- }
1186
-
1187
- class Type extends OptionObject {
1188
- constructor(attributes) {
1189
- super(CONFIG_NS_ID, "type", [
1190
- "none",
1191
- "ascii85",
1192
- "asciiHex",
1193
- "ccittfax",
1194
- "flate",
1195
- "lzw",
1196
- "runLength",
1197
- "native",
1198
- "xdp",
1199
- "mergedXDP",
1200
- ]);
1201
- }
1202
- }
1203
-
1204
- class Uri extends StringObject {
1205
- constructor(attributes) {
1206
- super(CONFIG_NS_ID, "uri");
1207
- }
1208
- }
1209
-
1210
- class Validate extends OptionObject {
1211
- constructor(attributes) {
1212
- super(CONFIG_NS_ID, "validate", [
1213
- "preSubmit",
1214
- "prePrint",
1215
- "preExecute",
1216
- "preSave",
1217
- ]);
1218
- }
1219
- }
1220
-
1221
- class ValidateApprovalSignatures extends ContentObject {
1222
- constructor(attributes) {
1223
- super(CONFIG_NS_ID, "validateApprovalSignatures");
1224
- }
1225
-
1226
- [$finalize]() {
1227
- this[$content] = this[$content]
1228
- .trim()
1229
- .split(/\s+/)
1230
- .filter(x => ["docReady", "postSign"].includes(x));
1231
- }
1232
- }
1233
-
1234
- class ValidationMessaging extends OptionObject {
1235
- constructor(attributes) {
1236
- super(CONFIG_NS_ID, "validationMessaging", [
1237
- "allMessagesIndividually",
1238
- "allMessagesTogether",
1239
- "firstMessageOnly",
1240
- "noMessages",
1241
- ]);
1242
- }
1243
- }
1244
-
1245
- class Version extends OptionObject {
1246
- constructor(attributes) {
1247
- super(CONFIG_NS_ID, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]);
1248
- }
1249
- }
1250
-
1251
- class VersionControl extends XFAObject {
1252
- constructor(attributes) {
1253
- super(CONFIG_NS_ID, "VersionControl");
1254
- this.outputBelow = getStringOption(attributes.outputBelow, [
1255
- "warn",
1256
- "error",
1257
- "update",
1258
- ]);
1259
- this.sourceAbove = getStringOption(attributes.sourceAbove, [
1260
- "warn",
1261
- "error",
1262
- ]);
1263
- this.sourceBelow = getStringOption(attributes.sourceBelow, [
1264
- "update",
1265
- "maintain",
1266
- ]);
1267
- }
1268
- }
1269
-
1270
- class ViewerPreferences extends XFAObject {
1271
- constructor(attributes) {
1272
- super(CONFIG_NS_ID, "viewerPreferences", /* hasChildren = */ true);
1273
- this.ADBE_JSConsole = null;
1274
- this.ADBE_JSDebugger = null;
1275
- this.addViewerPreferences = null;
1276
- this.duplexOption = null;
1277
- this.enforce = null;
1278
- this.numberOfCopies = null;
1279
- this.pageRange = null;
1280
- this.pickTrayByPDFSize = null;
1281
- this.printScaling = null;
1282
- }
1283
- }
1284
-
1285
- class WebClient extends XFAObject {
1286
- constructor(attributes) {
1287
- super(CONFIG_NS_ID, "webClient", /* hasChildren = */ true);
1288
- this.name = attributes.name ? attributes.name.trim() : "";
1289
- this.fontInfo = null;
1290
- this.xdc = null;
1291
- }
1292
- }
1293
-
1294
- class Whitespace extends OptionObject {
1295
- constructor(attributes) {
1296
- super(CONFIG_NS_ID, "whitespace", [
1297
- "preserve",
1298
- "ltrim",
1299
- "normalize",
1300
- "rtrim",
1301
- "trim",
1302
- ]);
1303
- }
1304
- }
1305
-
1306
- class Window extends ContentObject {
1307
- constructor(attributes) {
1308
- super(CONFIG_NS_ID, "window");
1309
- }
1310
-
1311
- [$finalize]() {
1312
- const pair = this[$content]
1313
- .trim()
1314
- .split(/\s*,\s*/, 2)
1315
- .map(x => parseInt(x, 10));
1316
- if (pair.some(x => isNaN(x))) {
1317
- this[$content] = [0, 0];
1318
- return;
1319
- }
1320
- if (pair.length === 1) {
1321
- pair.push(pair[0]);
1322
- }
1323
- this[$content] = pair;
1324
- }
1325
- }
1326
-
1327
- class Xdc extends XFAObject {
1328
- constructor(attributes) {
1329
- super(CONFIG_NS_ID, "xdc", /* hasChildren = */ true);
1330
- this.uri = new XFAObjectArray();
1331
- this.xsl = new XFAObjectArray();
1332
- }
1333
- }
1334
-
1335
- class Xdp extends XFAObject {
1336
- constructor(attributes) {
1337
- super(CONFIG_NS_ID, "xdp", /* hasChildren = */ true);
1338
- this.packets = null;
1339
- }
1340
- }
1341
-
1342
- class Xsl extends XFAObject {
1343
- constructor(attributes) {
1344
- super(CONFIG_NS_ID, "xsl", /* hasChildren = */ true);
1345
- this.debug = null;
1346
- this.uri = null;
1347
- }
1348
- }
1349
-
1350
- class Zpl extends XFAObject {
1351
- constructor(attributes) {
1352
- super(CONFIG_NS_ID, "zpl", /* hasChildren = */ true);
1353
- this.name = attributes.name ? attributes.name.trim() : "";
1354
- this.batchOutput = null;
1355
- this.flipLabel = null;
1356
- this.fontInfo = null;
1357
- this.xdc = null;
1358
- }
1359
- }
1360
-
1361
- class ConfigNamespace {
1362
- static [$buildXFAObject](name, attributes) {
1363
- if (ConfigNamespace.hasOwnProperty(name)) {
1364
- return ConfigNamespace[name](attributes);
1365
- }
1366
- return undefined;
1367
- }
1368
-
1369
- static acrobat(attrs) {
1370
- return new Acrobat(attrs);
1371
- }
1372
-
1373
- static acrobat7(attrs) {
1374
- return new Acrobat7(attrs);
1375
- }
1376
-
1377
- static ADBE_JSConsole(attrs) {
1378
- return new ADBE_JSConsole(attrs);
1379
- }
1380
-
1381
- static ADBE_JSDebugger(attrs) {
1382
- return new ADBE_JSDebugger(attrs);
1383
- }
1384
-
1385
- static addSilentPrint(attrs) {
1386
- return new AddSilentPrint(attrs);
1387
- }
1388
-
1389
- static addViewerPreferences(attrs) {
1390
- return new AddViewerPreferences(attrs);
1391
- }
1392
-
1393
- static adjustData(attrs) {
1394
- return new AdjustData(attrs);
1395
- }
1396
-
1397
- static adobeExtensionLevel(attrs) {
1398
- return new AdobeExtensionLevel(attrs);
1399
- }
1400
-
1401
- static agent(attrs) {
1402
- return new Agent(attrs);
1403
- }
1404
-
1405
- static alwaysEmbed(attrs) {
1406
- return new AlwaysEmbed(attrs);
1407
- }
1408
-
1409
- static amd(attrs) {
1410
- return new Amd(attrs);
1411
- }
1412
-
1413
- static area(attrs) {
1414
- return new Area(attrs);
1415
- }
1416
-
1417
- static attributes(attrs) {
1418
- return new Attributes(attrs);
1419
- }
1420
-
1421
- static autoSave(attrs) {
1422
- return new AutoSave(attrs);
1423
- }
1424
-
1425
- static base(attrs) {
1426
- return new Base(attrs);
1427
- }
1428
-
1429
- static batchOutput(attrs) {
1430
- return new BatchOutput(attrs);
1431
- }
1432
-
1433
- static behaviorOverride(attrs) {
1434
- return new BehaviorOverride(attrs);
1435
- }
1436
-
1437
- static cache(attrs) {
1438
- return new Cache(attrs);
1439
- }
1440
-
1441
- static change(attrs) {
1442
- return new Change(attrs);
1443
- }
1444
-
1445
- static common(attrs) {
1446
- return new Common(attrs);
1447
- }
1448
-
1449
- static compress(attrs) {
1450
- return new Compress(attrs);
1451
- }
1452
-
1453
- static compressLogicalStructure(attrs) {
1454
- return new CompressLogicalStructure(attrs);
1455
- }
1456
-
1457
- static compressObjectStream(attrs) {
1458
- return new CompressObjectStream(attrs);
1459
- }
1460
-
1461
- static compression(attrs) {
1462
- return new Compression(attrs);
1463
- }
1464
-
1465
- static config(attrs) {
1466
- return new Config(attrs);
1467
- }
1468
-
1469
- static conformance(attrs) {
1470
- return new Conformance(attrs);
1471
- }
1472
-
1473
- static contentCopy(attrs) {
1474
- return new ContentCopy(attrs);
1475
- }
1476
-
1477
- static copies(attrs) {
1478
- return new Copies(attrs);
1479
- }
1480
-
1481
- static creator(attrs) {
1482
- return new Creator(attrs);
1483
- }
1484
-
1485
- static currentPage(attrs) {
1486
- return new CurrentPage(attrs);
1487
- }
1488
-
1489
- static data(attrs) {
1490
- return new Data(attrs);
1491
- }
1492
-
1493
- static debug(attrs) {
1494
- return new Debug(attrs);
1495
- }
1496
-
1497
- static defaultTypeface(attrs) {
1498
- return new DefaultTypeface(attrs);
1499
- }
1500
-
1501
- static destination(attrs) {
1502
- return new Destination(attrs);
1503
- }
1504
-
1505
- static documentAssembly(attrs) {
1506
- return new DocumentAssembly(attrs);
1507
- }
1508
-
1509
- static driver(attrs) {
1510
- return new Driver(attrs);
1511
- }
1512
-
1513
- static duplexOption(attrs) {
1514
- return new DuplexOption(attrs);
1515
- }
1516
-
1517
- static dynamicRender(attrs) {
1518
- return new DynamicRender(attrs);
1519
- }
1520
-
1521
- static embed(attrs) {
1522
- return new Embed(attrs);
1523
- }
1524
-
1525
- static encrypt(attrs) {
1526
- return new Encrypt(attrs);
1527
- }
1528
-
1529
- static encryption(attrs) {
1530
- return new Encryption(attrs);
1531
- }
1532
-
1533
- static encryptionLevel(attrs) {
1534
- return new EncryptionLevel(attrs);
1535
- }
1536
-
1537
- static enforce(attrs) {
1538
- return new Enforce(attrs);
1539
- }
1540
-
1541
- static equate(attrs) {
1542
- return new Equate(attrs);
1543
- }
1544
-
1545
- static equateRange(attrs) {
1546
- return new EquateRange(attrs);
1547
- }
1548
-
1549
- static exclude(attrs) {
1550
- return new Exclude(attrs);
1551
- }
1552
-
1553
- static excludeNS(attrs) {
1554
- return new ExcludeNS(attrs);
1555
- }
1556
-
1557
- static flipLabel(attrs) {
1558
- return new FlipLabel(attrs);
1559
- }
1560
-
1561
- static fontInfo(attrs) {
1562
- return new FontInfo(attrs);
1563
- }
1564
-
1565
- static formFieldFilling(attrs) {
1566
- return new FormFieldFilling(attrs);
1567
- }
1568
-
1569
- static groupParent(attrs) {
1570
- return new GroupParent(attrs);
1571
- }
1572
-
1573
- static ifEmpty(attrs) {
1574
- return new IfEmpty(attrs);
1575
- }
1576
-
1577
- static includeXDPContent(attrs) {
1578
- return new IncludeXDPContent(attrs);
1579
- }
1580
-
1581
- static incrementalLoad(attrs) {
1582
- return new IncrementalLoad(attrs);
1583
- }
1584
-
1585
- static incrementalMerge(attrs) {
1586
- return new IncrementalMerge(attrs);
1587
- }
1588
-
1589
- static interactive(attrs) {
1590
- return new Interactive(attrs);
1591
- }
1592
-
1593
- static jog(attrs) {
1594
- return new Jog(attrs);
1595
- }
1596
-
1597
- static labelPrinter(attrs) {
1598
- return new LabelPrinter(attrs);
1599
- }
1600
-
1601
- static layout(attrs) {
1602
- return new Layout(attrs);
1603
- }
1604
-
1605
- static level(attrs) {
1606
- return new Level(attrs);
1607
- }
1608
-
1609
- static linearized(attrs) {
1610
- return new Linearized(attrs);
1611
- }
1612
-
1613
- static locale(attrs) {
1614
- return new Locale(attrs);
1615
- }
1616
-
1617
- static localeSet(attrs) {
1618
- return new LocaleSet(attrs);
1619
- }
1620
-
1621
- static log(attrs) {
1622
- return new Log(attrs);
1623
- }
1624
-
1625
- static map(attrs) {
1626
- return new MapElement(attrs);
1627
- }
1628
-
1629
- static mediumInfo(attrs) {
1630
- return new MediumInfo(attrs);
1631
- }
1632
-
1633
- static message(attrs) {
1634
- return new Message(attrs);
1635
- }
1636
-
1637
- static messaging(attrs) {
1638
- return new Messaging(attrs);
1639
- }
1640
-
1641
- static mode(attrs) {
1642
- return new Mode(attrs);
1643
- }
1644
-
1645
- static modifyAnnots(attrs) {
1646
- return new ModifyAnnots(attrs);
1647
- }
1648
-
1649
- static msgId(attrs) {
1650
- return new MsgId(attrs);
1651
- }
1652
-
1653
- static nameAttr(attrs) {
1654
- return new NameAttr(attrs);
1655
- }
1656
-
1657
- static neverEmbed(attrs) {
1658
- return new NeverEmbed(attrs);
1659
- }
1660
-
1661
- static numberOfCopies(attrs) {
1662
- return new NumberOfCopies(attrs);
1663
- }
1664
-
1665
- static openAction(attrs) {
1666
- return new OpenAction(attrs);
1667
- }
1668
-
1669
- static output(attrs) {
1670
- return new Output(attrs);
1671
- }
1672
-
1673
- static outputBin(attrs) {
1674
- return new OutputBin(attrs);
1675
- }
1676
-
1677
- static outputXSL(attrs) {
1678
- return new OutputXSL(attrs);
1679
- }
1680
-
1681
- static overprint(attrs) {
1682
- return new Overprint(attrs);
1683
- }
1684
-
1685
- static packets(attrs) {
1686
- return new Packets(attrs);
1687
- }
1688
-
1689
- static pageOffset(attrs) {
1690
- return new PageOffset(attrs);
1691
- }
1692
-
1693
- static pageRange(attrs) {
1694
- return new PageRange(attrs);
1695
- }
1696
-
1697
- static pagination(attrs) {
1698
- return new Pagination(attrs);
1699
- }
1700
-
1701
- static paginationOverride(attrs) {
1702
- return new PaginationOverride(attrs);
1703
- }
1704
-
1705
- static part(attrs) {
1706
- return new Part(attrs);
1707
- }
1708
-
1709
- static pcl(attrs) {
1710
- return new Pcl(attrs);
1711
- }
1712
-
1713
- static pdf(attrs) {
1714
- return new Pdf(attrs);
1715
- }
1716
-
1717
- static pdfa(attrs) {
1718
- return new Pdfa(attrs);
1719
- }
1720
-
1721
- static permissions(attrs) {
1722
- return new Permissions(attrs);
1723
- }
1724
-
1725
- static pickTrayByPDFSize(attrs) {
1726
- return new PickTrayByPDFSize(attrs);
1727
- }
1728
-
1729
- static picture(attrs) {
1730
- return new Picture(attrs);
1731
- }
1732
-
1733
- static plaintextMetadata(attrs) {
1734
- return new PlaintextMetadata(attrs);
1735
- }
1736
-
1737
- static presence(attrs) {
1738
- return new Presence(attrs);
1739
- }
1740
-
1741
- static present(attrs) {
1742
- return new Present(attrs);
1743
- }
1744
-
1745
- static print(attrs) {
1746
- return new Print(attrs);
1747
- }
1748
-
1749
- static printHighQuality(attrs) {
1750
- return new PrintHighQuality(attrs);
1751
- }
1752
-
1753
- static printScaling(attrs) {
1754
- return new PrintScaling(attrs);
1755
- }
1756
-
1757
- static printerName(attrs) {
1758
- return new PrinterName(attrs);
1759
- }
1760
-
1761
- static producer(attrs) {
1762
- return new Producer(attrs);
1763
- }
1764
-
1765
- static ps(attrs) {
1766
- return new Ps(attrs);
1767
- }
1768
-
1769
- static range(attrs) {
1770
- return new Range(attrs);
1771
- }
1772
-
1773
- static record(attrs) {
1774
- return new Record(attrs);
1775
- }
1776
-
1777
- static relevant(attrs) {
1778
- return new Relevant(attrs);
1779
- }
1780
-
1781
- static rename(attrs) {
1782
- return new Rename(attrs);
1783
- }
1784
-
1785
- static renderPolicy(attrs) {
1786
- return new RenderPolicy(attrs);
1787
- }
1788
-
1789
- static runScripts(attrs) {
1790
- return new RunScripts(attrs);
1791
- }
1792
-
1793
- static script(attrs) {
1794
- return new Script(attrs);
1795
- }
1796
-
1797
- static scriptModel(attrs) {
1798
- return new ScriptModel(attrs);
1799
- }
1800
-
1801
- static severity(attrs) {
1802
- return new Severity(attrs);
1803
- }
1804
-
1805
- static silentPrint(attrs) {
1806
- return new SilentPrint(attrs);
1807
- }
1808
-
1809
- static staple(attrs) {
1810
- return new Staple(attrs);
1811
- }
1812
-
1813
- static startNode(attrs) {
1814
- return new StartNode(attrs);
1815
- }
1816
-
1817
- static startPage(attrs) {
1818
- return new StartPage(attrs);
1819
- }
1820
-
1821
- static submitFormat(attrs) {
1822
- return new SubmitFormat(attrs);
1823
- }
1824
-
1825
- static submitUrl(attrs) {
1826
- return new SubmitUrl(attrs);
1827
- }
1828
-
1829
- static subsetBelow(attrs) {
1830
- return new SubsetBelow(attrs);
1831
- }
1832
-
1833
- static suppressBanner(attrs) {
1834
- return new SuppressBanner(attrs);
1835
- }
1836
-
1837
- static tagged(attrs) {
1838
- return new Tagged(attrs);
1839
- }
1840
-
1841
- static template(attrs) {
1842
- return new Template(attrs);
1843
- }
1844
-
1845
- static templateCache(attrs) {
1846
- return new TemplateCache(attrs);
1847
- }
1848
-
1849
- static threshold(attrs) {
1850
- return new Threshold(attrs);
1851
- }
1852
-
1853
- static to(attrs) {
1854
- return new To(attrs);
1855
- }
1856
-
1857
- static trace(attrs) {
1858
- return new Trace(attrs);
1859
- }
1860
-
1861
- static transform(attrs) {
1862
- return new Transform(attrs);
1863
- }
1864
-
1865
- static type(attrs) {
1866
- return new Type(attrs);
1867
- }
1868
-
1869
- static uri(attrs) {
1870
- return new Uri(attrs);
1871
- }
1872
-
1873
- static validate(attrs) {
1874
- return new Validate(attrs);
1875
- }
1876
-
1877
- static validateApprovalSignatures(attrs) {
1878
- return new ValidateApprovalSignatures(attrs);
1879
- }
1880
-
1881
- static validationMessaging(attrs) {
1882
- return new ValidationMessaging(attrs);
1883
- }
1884
-
1885
- static version(attrs) {
1886
- return new Version(attrs);
1887
- }
1888
-
1889
- static versionControl(attrs) {
1890
- return new VersionControl(attrs);
1891
- }
1892
-
1893
- static viewerPreferences(attrs) {
1894
- return new ViewerPreferences(attrs);
1895
- }
1896
-
1897
- static webClient(attrs) {
1898
- return new WebClient(attrs);
1899
- }
1900
-
1901
- static whitespace(attrs) {
1902
- return new Whitespace(attrs);
1903
- }
1904
-
1905
- static window(attrs) {
1906
- return new Window(attrs);
1907
- }
1908
-
1909
- static xdc(attrs) {
1910
- return new Xdc(attrs);
1911
- }
1912
-
1913
- static xdp(attrs) {
1914
- return new Xdp(attrs);
1915
- }
1916
-
1917
- static xsl(attrs) {
1918
- return new Xsl(attrs);
1919
- }
1920
-
1921
- static zpl(attrs) {
1922
- return new Zpl(attrs);
1923
- }
1924
- }
1925
-
1926
- export { ConfigNamespace };