@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,464 +0,0 @@
1
- /* Copyright 2019 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 {
17
- assert,
18
- BaseException,
19
- objectSize,
20
- stringToPDFString,
21
- warn,
22
- } from "../shared/util";
23
- import { Dict, isName, isRef, isStream, RefSet } from "./primitives.js";
24
-
25
- function getLookupTableFactory(initializer) {
26
- let lookup;
27
- return function () {
28
- if (initializer) {
29
- lookup = Object.create(null);
30
- initializer(lookup);
31
- initializer = null;
32
- }
33
- return lookup;
34
- };
35
- }
36
-
37
- function getArrayLookupTableFactory(initializer) {
38
- let lookup;
39
- return function () {
40
- if (initializer) {
41
- let arr = initializer();
42
- initializer = null;
43
- lookup = Object.create(null);
44
- for (let i = 0, ii = arr.length; i < ii; i += 2) {
45
- lookup[arr[i]] = arr[i + 1];
46
- }
47
- arr = null;
48
- }
49
- return lookup;
50
- };
51
- }
52
-
53
- class MissingDataException extends BaseException {
54
- constructor(begin, end) {
55
- super(`Missing data [${begin}, ${end})`);
56
- this.begin = begin;
57
- this.end = end;
58
- }
59
- }
60
-
61
- class ParserEOFException extends BaseException {}
62
-
63
- class XRefEntryException extends BaseException {}
64
-
65
- class XRefParseException extends BaseException {}
66
-
67
- /**
68
- * Get the value of an inheritable property.
69
- *
70
- * If the PDF specification explicitly lists a property in a dictionary as
71
- * inheritable, then the value of the property may be present in the dictionary
72
- * itself or in one or more parents of the dictionary.
73
- *
74
- * If the key is not found in the tree, `undefined` is returned. Otherwise,
75
- * the value for the key is returned or, if `stopWhenFound` is `false`, a list
76
- * of values is returned.
77
- *
78
- * @param {Dict} dict - Dictionary from where to start the traversal.
79
- * @param {string} key - The key of the property to find the value for.
80
- * @param {boolean} getArray - Whether or not the value should be fetched as an
81
- * array. The default value is `false`.
82
- * @param {boolean} stopWhenFound - Whether or not to stop the traversal when
83
- * the key is found. If set to `false`, we always walk up the entire parent
84
- * chain, for example to be able to find `\Resources` placed on multiple
85
- * levels of the tree. The default value is `true`.
86
- */
87
- function getInheritableProperty({
88
- dict,
89
- key,
90
- getArray = false,
91
- stopWhenFound = true,
92
- }) {
93
- let values;
94
- const visited = new RefSet();
95
-
96
- while (dict instanceof Dict && !(dict.objId && visited.has(dict.objId))) {
97
- if (dict.objId) {
98
- visited.put(dict.objId);
99
- }
100
- const value = getArray ? dict.getArray(key) : dict.get(key);
101
- if (value !== undefined) {
102
- if (stopWhenFound) {
103
- return value;
104
- }
105
- if (!values) {
106
- values = [];
107
- }
108
- values.push(value);
109
- }
110
- dict = dict.get("Parent");
111
- }
112
- return values;
113
- }
114
-
115
- // prettier-ignore
116
- const ROMAN_NUMBER_MAP = [
117
- "", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM",
118
- "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC",
119
- "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"
120
- ];
121
-
122
- /**
123
- * Converts positive integers to (upper case) Roman numerals.
124
- * @param {number} number - The number that should be converted.
125
- * @param {boolean} lowerCase - Indicates if the result should be converted
126
- * to lower case letters. The default value is `false`.
127
- * @returns {string} The resulting Roman number.
128
- */
129
- function toRomanNumerals(number, lowerCase = false) {
130
- assert(
131
- Number.isInteger(number) && number > 0,
132
- "The number should be a positive integer."
133
- );
134
- const romanBuf = [];
135
- let pos;
136
- // Thousands
137
- while (number >= 1000) {
138
- number -= 1000;
139
- romanBuf.push("M");
140
- }
141
- // Hundreds
142
- pos = (number / 100) | 0;
143
- number %= 100;
144
- romanBuf.push(ROMAN_NUMBER_MAP[pos]);
145
- // Tens
146
- pos = (number / 10) | 0;
147
- number %= 10;
148
- romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]);
149
- // Ones
150
- romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); // eslint-disable-line unicorn/no-array-push-push
151
-
152
- const romanStr = romanBuf.join("");
153
- return lowerCase ? romanStr.toLowerCase() : romanStr;
154
- }
155
-
156
- // Calculate the base 2 logarithm of the number `x`. This differs from the
157
- // native function in the sense that it returns the ceiling value and that it
158
- // returns 0 instead of `Infinity`/`NaN` for `x` values smaller than/equal to 0.
159
- function log2(x) {
160
- if (x <= 0) {
161
- return 0;
162
- }
163
- return Math.ceil(Math.log2(x));
164
- }
165
-
166
- function readInt8(data, offset) {
167
- return (data[offset] << 24) >> 24;
168
- }
169
-
170
- function readUint16(data, offset) {
171
- return (data[offset] << 8) | data[offset + 1];
172
- }
173
-
174
- function readUint32(data, offset) {
175
- return (
176
- ((data[offset] << 24) |
177
- (data[offset + 1] << 16) |
178
- (data[offset + 2] << 8) |
179
- data[offset + 3]) >>>
180
- 0
181
- );
182
- }
183
-
184
- // Checks if ch is one of the following characters: SPACE, TAB, CR or LF.
185
- function isWhiteSpace(ch) {
186
- return ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a;
187
- }
188
-
189
- /**
190
- * AcroForm field names use an array like notation to refer to
191
- * repeated XFA elements e.g. foo.bar[nnn].
192
- * see: XFA Spec Chapter 3 - Repeated Elements
193
- *
194
- * @param {string} path - XFA path name.
195
- * @returns {Array} - Array of Objects with the name and pos of
196
- * each part of the path.
197
- */
198
- function parseXFAPath(path) {
199
- const positionPattern = /(.+)\[([0-9]+)\]$/;
200
- return path.split(".").map(component => {
201
- const m = component.match(positionPattern);
202
- if (m) {
203
- return { name: m[1], pos: parseInt(m[2], 10) };
204
- }
205
- return { name: component, pos: 0 };
206
- });
207
- }
208
-
209
- function escapePDFName(str) {
210
- const buffer = [];
211
- let start = 0;
212
- for (let i = 0, ii = str.length; i < ii; i++) {
213
- const char = str.charCodeAt(i);
214
- // Whitespace or delimiters aren't regular chars, so escape them.
215
- if (
216
- char < 0x21 ||
217
- char > 0x7e ||
218
- char === 0x23 /* # */ ||
219
- char === 0x28 /* ( */ ||
220
- char === 0x29 /* ) */ ||
221
- char === 0x3c /* < */ ||
222
- char === 0x3e /* > */ ||
223
- char === 0x5b /* [ */ ||
224
- char === 0x5d /* ] */ ||
225
- char === 0x7b /* { */ ||
226
- char === 0x7d /* } */ ||
227
- char === 0x2f /* / */ ||
228
- char === 0x25 /* % */
229
- ) {
230
- if (start < i) {
231
- buffer.push(str.substring(start, i));
232
- }
233
- buffer.push(`#${char.toString(16)}`);
234
- start = i + 1;
235
- }
236
- }
237
-
238
- if (buffer.length === 0) {
239
- return str;
240
- }
241
-
242
- if (start < str.length) {
243
- buffer.push(str.substring(start, str.length));
244
- }
245
-
246
- return buffer.join("");
247
- }
248
-
249
- function _collectJS(entry, xref, list, parents) {
250
- if (!entry) {
251
- return;
252
- }
253
-
254
- let parent = null;
255
- if (isRef(entry)) {
256
- if (parents.has(entry)) {
257
- // If we've already found entry then we've a cycle.
258
- return;
259
- }
260
- parent = entry;
261
- parents.put(parent);
262
- entry = xref.fetch(entry);
263
- }
264
- if (Array.isArray(entry)) {
265
- for (const element of entry) {
266
- _collectJS(element, xref, list, parents);
267
- }
268
- } else if (entry instanceof Dict) {
269
- if (isName(entry.get("S"), "JavaScript") && entry.has("JS")) {
270
- const js = entry.get("JS");
271
- let code;
272
- if (isStream(js)) {
273
- code = js.getString();
274
- } else {
275
- code = js;
276
- }
277
- code = stringToPDFString(code);
278
- if (code) {
279
- list.push(code);
280
- }
281
- }
282
- _collectJS(entry.getRaw("Next"), xref, list, parents);
283
- }
284
-
285
- if (parent) {
286
- parents.remove(parent);
287
- }
288
- }
289
-
290
- function collectActions(xref, dict, eventType) {
291
- const actions = Object.create(null);
292
- const additionalActionsDicts = getInheritableProperty({
293
- dict,
294
- key: "AA",
295
- stopWhenFound: false,
296
- });
297
- if (additionalActionsDicts) {
298
- // additionalActionsDicts contains dicts from ancestors
299
- // as they're found in the tree from bottom to top.
300
- // So the dicts are visited in reverse order to guarantee
301
- // that actions from elder ancestors will be overwritten
302
- // by ones from younger ancestors.
303
- for (let i = additionalActionsDicts.length - 1; i >= 0; i--) {
304
- const additionalActions = additionalActionsDicts[i];
305
- if (!(additionalActions instanceof Dict)) {
306
- continue;
307
- }
308
- for (const key of additionalActions.getKeys()) {
309
- const action = eventType[key];
310
- if (!action) {
311
- continue;
312
- }
313
- const actionDict = additionalActions.getRaw(key);
314
- const parents = new RefSet();
315
- const list = [];
316
- _collectJS(actionDict, xref, list, parents);
317
- if (list.length > 0) {
318
- actions[action] = list;
319
- }
320
- }
321
- }
322
- }
323
- // Collect the Action if any (we may have one on pushbutton).
324
- if (dict.has("A")) {
325
- const actionDict = dict.get("A");
326
- const parents = new RefSet();
327
- const list = [];
328
- _collectJS(actionDict, xref, list, parents);
329
- if (list.length > 0) {
330
- actions.Action = list;
331
- }
332
- }
333
- return objectSize(actions) > 0 ? actions : null;
334
- }
335
-
336
- const XMLEntities = {
337
- /* < */ 0x3c: "&lt;",
338
- /* > */ 0x3e: "&gt;",
339
- /* & */ 0x26: "&amp;",
340
- /* " */ 0x22: "&quot;",
341
- /* ' */ 0x27: "&apos;",
342
- };
343
-
344
- function encodeToXmlString(str) {
345
- const buffer = [];
346
- let start = 0;
347
- for (let i = 0, ii = str.length; i < ii; i++) {
348
- const char = str.codePointAt(i);
349
- if (0x20 <= char && char <= 0x7e) {
350
- // ascii
351
- const entity = XMLEntities[char];
352
- if (entity) {
353
- if (start < i) {
354
- buffer.push(str.substring(start, i));
355
- }
356
- buffer.push(entity);
357
- start = i + 1;
358
- }
359
- } else {
360
- if (start < i) {
361
- buffer.push(str.substring(start, i));
362
- }
363
- buffer.push(`&#x${char.toString(16).toUpperCase()};`);
364
- if (char > 0xd7ff && (char < 0xe000 || char > 0xfffd)) {
365
- // char is represented by two u16
366
- i++;
367
- }
368
- start = i + 1;
369
- }
370
- }
371
-
372
- if (buffer.length === 0) {
373
- return str;
374
- }
375
- if (start < str.length) {
376
- buffer.push(str.substring(start, str.length));
377
- }
378
- return buffer.join("");
379
- }
380
-
381
- function validateCSSFont(cssFontInfo) {
382
- // See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style.
383
- const DEFAULT_CSS_FONT_OBLIQUE = "14";
384
- // See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight.
385
- const DEFAULT_CSS_FONT_WEIGHT = "400";
386
- const CSS_FONT_WEIGHT_VALUES = new Set([
387
- "100",
388
- "200",
389
- "300",
390
- "400",
391
- "500",
392
- "600",
393
- "700",
394
- "800",
395
- "900",
396
- "1000",
397
- "normal",
398
- "bold",
399
- "bolder",
400
- "lighter",
401
- ]);
402
-
403
- const { fontFamily, fontWeight, italicAngle } = cssFontInfo;
404
-
405
- // See https://developer.mozilla.org/en-US/docs/Web/CSS/string.
406
- if (/^".*"$/.test(fontFamily)) {
407
- if (/[^\\]"/.test(fontFamily.slice(1, fontFamily.length - 1))) {
408
- warn(`XFA - FontFamily contains some unescaped ": ${fontFamily}.`);
409
- return false;
410
- }
411
- } else if (/^'.*'$/.test(fontFamily)) {
412
- if (/[^\\]'/.test(fontFamily.slice(1, fontFamily.length - 1))) {
413
- warn(`XFA - FontFamily contains some unescaped ': ${fontFamily}.`);
414
- return false;
415
- }
416
- } else {
417
- // See https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident.
418
- for (const ident of fontFamily.split(/[ \t]+/)) {
419
- if (
420
- /^([0-9]|(-([0-9]|-)))/.test(ident) ||
421
- !/^[a-zA-Z0-9\-_\\]+$/.test(ident)
422
- ) {
423
- warn(
424
- `XFA - FontFamily contains some invalid <custom-ident>: ${fontFamily}.`
425
- );
426
- return false;
427
- }
428
- }
429
- }
430
-
431
- const weight = fontWeight ? fontWeight.toString() : "";
432
- cssFontInfo.fontWeight = CSS_FONT_WEIGHT_VALUES.has(weight)
433
- ? weight
434
- : DEFAULT_CSS_FONT_WEIGHT;
435
-
436
- const angle = parseFloat(italicAngle);
437
- cssFontInfo.italicAngle =
438
- isNaN(angle) || angle < -90 || angle > 90
439
- ? DEFAULT_CSS_FONT_OBLIQUE
440
- : italicAngle.toString();
441
-
442
- return true;
443
- }
444
-
445
- export {
446
- collectActions,
447
- encodeToXmlString,
448
- escapePDFName,
449
- getArrayLookupTableFactory,
450
- getInheritableProperty,
451
- getLookupTableFactory,
452
- isWhiteSpace,
453
- log2,
454
- MissingDataException,
455
- ParserEOFException,
456
- parseXFAPath,
457
- readInt8,
458
- readUint16,
459
- readUint32,
460
- toRomanNumerals,
461
- validateCSSFont,
462
- XRefEntryException,
463
- XRefParseException,
464
- };