pdfjs-dist 2.2.228 → 2.6.347
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.
Potentially problematic release.
This version of pdfjs-dist might be problematic. Click here for more details.
- package/README.md +4 -0
- package/bower.json +1 -1
- package/build/pdf.js +8816 -19300
- package/build/pdf.js.map +1 -1
- package/build/pdf.min.js +22 -1
- package/build/pdf.worker.entry.js +5 -3
- package/build/pdf.worker.js +27185 -35746
- package/build/pdf.worker.js.map +1 -1
- package/build/pdf.worker.min.js +22 -1
- package/es5/build/pdf.js +26665 -0
- package/es5/build/pdf.js.map +1 -0
- package/es5/build/pdf.min.js +22 -0
- package/{lib/shared/global_scope.js → es5/build/pdf.worker.entry.js} +5 -10
- package/es5/build/pdf.worker.js +61231 -0
- package/es5/build/pdf.worker.js.map +1 -0
- package/es5/build/pdf.worker.min.js +22 -0
- package/es5/image_decoders/pdf.image_decoders.js +12529 -0
- package/es5/image_decoders/pdf.image_decoders.js.map +1 -0
- package/es5/image_decoders/pdf.image_decoders.min.js +22 -0
- package/es5/web/images/annotation-check.svg +11 -0
- package/es5/web/images/annotation-comment.svg +16 -0
- package/es5/web/images/annotation-help.svg +26 -0
- package/es5/web/images/annotation-insert.svg +10 -0
- package/es5/web/images/annotation-key.svg +11 -0
- package/es5/web/images/annotation-newparagraph.svg +11 -0
- package/es5/web/images/annotation-noicon.svg +7 -0
- package/es5/web/images/annotation-note.svg +42 -0
- package/es5/web/images/annotation-paragraph.svg +16 -0
- package/es5/web/images/loading-icon.gif +0 -0
- package/es5/web/images/shadow.png +0 -0
- package/es5/web/pdf_viewer.css +406 -0
- package/es5/web/pdf_viewer.js +7886 -0
- package/es5/web/pdf_viewer.js.map +1 -0
- package/image_decoders/pdf.image_decoders.js +1498 -4832
- package/image_decoders/pdf.image_decoders.js.map +1 -1
- package/image_decoders/pdf.image_decoders.min.js +22 -1
- package/lib/README.md +7 -0
- package/lib/core/annotation.js +1144 -927
- package/lib/core/arithmetic_decoder.js +81 -97
- package/lib/core/bidi.js +54 -46
- package/lib/core/ccitt.js +88 -81
- package/lib/core/ccitt_stream.js +15 -14
- package/lib/core/cff_parser.js +747 -716
- package/lib/core/charsets.js +4 -4
- package/lib/core/chunked_stream.js +462 -553
- package/lib/core/cmap.js +231 -277
- package/lib/core/colorspace.js +715 -857
- package/lib/core/core_utils.js +57 -52
- package/lib/core/crypto.js +416 -437
- package/lib/core/document.js +629 -670
- package/lib/core/encodings.js +15 -15
- package/lib/core/evaluator.js +3229 -2800
- package/lib/core/font_renderer.js +135 -178
- package/lib/core/fonts.js +602 -534
- package/lib/core/function.js +355 -279
- package/lib/core/glyphlist.js +4527 -4526
- package/lib/core/image.js +442 -439
- package/lib/core/image_utils.js +221 -61
- package/lib/core/jbig2.js +325 -316
- package/lib/core/jbig2_stream.js +18 -17
- package/lib/core/jpeg_stream.js +21 -26
- package/lib/core/jpg.js +289 -233
- package/lib/core/jpx.js +161 -143
- package/lib/core/jpx_stream.js +28 -28
- package/lib/core/metrics.js +2928 -2928
- package/lib/core/murmurhash3.js +87 -102
- package/lib/core/obj.js +1343 -1300
- package/lib/core/operator_list.js +90 -67
- package/lib/core/parser.js +990 -987
- package/lib/core/pattern.js +105 -77
- package/lib/core/pdf_manager.js +149 -316
- package/lib/core/primitives.js +156 -104
- package/lib/core/ps_parser.js +175 -214
- package/lib/core/standard_fonts.js +237 -236
- package/lib/core/stream.js +94 -74
- package/lib/core/type1_parser.js +89 -69
- package/lib/core/unicode.js +1654 -1654
- package/lib/core/worker.js +275 -290
- package/lib/core/worker_stream.js +101 -210
- package/lib/core/writer.js +242 -0
- package/lib/display/annotation_layer.js +772 -1041
- package/lib/display/annotation_storage.js +89 -0
- package/lib/display/api.js +1575 -1868
- package/lib/display/api_compatibility.js +12 -17
- package/lib/display/canvas.js +370 -222
- package/lib/display/content_disposition.js +40 -59
- package/lib/display/display_utils.js +341 -536
- package/lib/display/fetch_stream.js +188 -304
- package/lib/display/font_loader.js +282 -414
- package/lib/display/metadata.js +81 -99
- package/lib/display/network.js +362 -511
- package/lib/display/network_utils.js +25 -18
- package/lib/display/node_stream.js +283 -465
- package/lib/display/node_utils.js +87 -0
- package/lib/display/optional_content_config.js +184 -0
- package/lib/display/pattern_helper.js +93 -44
- package/lib/display/svg.js +1163 -1401
- package/lib/display/text_layer.js +154 -137
- package/lib/display/transport_stream.js +237 -375
- package/lib/display/webgl.js +70 -83
- package/lib/display/worker_options.js +3 -3
- package/lib/display/xml_parser.js +303 -392
- package/lib/examples/node/domstubs.js +37 -37
- package/lib/pdf.js +220 -58
- package/lib/pdf.worker.js +14 -6
- package/lib/shared/compatibility.js +3 -246
- package/lib/shared/is_node.js +7 -6
- package/lib/shared/message_handler.js +327 -332
- package/lib/shared/util.js +271 -306
- package/lib/test/unit/annotation_spec.js +1902 -763
- package/lib/test/unit/annotation_storage_spec.js +83 -0
- package/lib/test/unit/api_spec.js +790 -592
- package/lib/test/unit/bidi_spec.js +7 -7
- package/lib/test/unit/cff_parser_spec.js +73 -72
- package/lib/test/unit/clitests_helper.js +7 -9
- package/lib/test/unit/cmap_spec.js +86 -88
- package/lib/test/unit/colorspace_spec.js +346 -154
- package/lib/test/unit/core_utils_spec.js +125 -105
- package/lib/test/unit/crypto_spec.js +232 -185
- package/lib/test/unit/custom_spec.js +150 -24
- package/lib/test/unit/display_svg_spec.js +34 -39
- package/lib/test/unit/display_utils_spec.js +139 -149
- package/lib/test/unit/document_spec.js +128 -17
- package/lib/test/unit/encodings_spec.js +12 -34
- package/lib/test/unit/evaluator_spec.js +112 -91
- package/lib/test/unit/fetch_stream_spec.js +31 -29
- package/lib/test/unit/function_spec.js +206 -204
- package/lib/test/unit/jasmine-boot.js +48 -32
- package/lib/test/unit/message_handler_spec.js +173 -159
- package/lib/test/unit/metadata_spec.js +71 -71
- package/lib/test/unit/murmurhash3_spec.js +12 -12
- package/lib/test/unit/network_spec.js +13 -11
- package/lib/test/unit/network_utils_spec.js +158 -144
- package/lib/test/unit/node_stream_spec.js +76 -90
- package/lib/test/unit/parser_spec.js +108 -114
- package/lib/test/unit/pdf_find_controller_spec.js +55 -86
- package/lib/test/unit/pdf_find_utils_spec.js +32 -32
- package/lib/test/unit/pdf_history_spec.js +32 -32
- package/lib/test/unit/primitives_spec.js +337 -156
- package/lib/test/unit/stream_spec.js +16 -14
- package/lib/test/unit/test_utils.js +91 -304
- package/lib/test/unit/testreporter.js +33 -22
- package/lib/test/unit/type1_parser_spec.js +42 -42
- package/lib/test/unit/ui_utils_spec.js +299 -461
- package/lib/test/unit/unicode_spec.js +42 -42
- package/lib/test/unit/util_spec.js +129 -149
- package/lib/test/unit/writer_spec.js +84 -0
- package/lib/web/annotation_layer_builder.js +78 -111
- package/lib/web/app.js +1542 -1267
- package/lib/web/app_options.js +76 -91
- package/lib/web/base_tree_viewer.js +100 -0
- package/lib/web/base_viewer.js +869 -834
- package/lib/web/chromecom.js +165 -252
- package/lib/web/debugger.js +149 -205
- package/lib/web/download_manager.js +34 -58
- package/lib/web/firefox_print_service.js +62 -34
- package/lib/web/firefoxcom.js +206 -374
- package/lib/web/genericcom.js +26 -108
- package/lib/web/genericl10n.js +24 -153
- package/lib/web/grab_to_pan.js +30 -30
- package/lib/web/interfaces.js +80 -254
- package/lib/web/overlay_manager.js +70 -246
- package/lib/web/password_prompt.js +38 -64
- package/lib/web/pdf_attachment_viewer.js +150 -126
- package/lib/web/pdf_cursor_tools.js +75 -102
- package/lib/web/pdf_document_properties.js +229 -383
- package/lib/web/pdf_find_bar.js +136 -170
- package/lib/web/pdf_find_controller.js +492 -548
- package/lib/web/pdf_find_utils.js +13 -13
- package/lib/web/pdf_history.js +397 -406
- package/lib/web/pdf_layer_viewer.js +208 -0
- package/lib/web/pdf_link_service.js +304 -348
- package/lib/web/pdf_outline_viewer.js +119 -212
- package/lib/web/pdf_page_view.js +474 -513
- package/lib/web/pdf_presentation_mode.js +308 -357
- package/lib/web/pdf_print_service.js +96 -110
- package/lib/web/pdf_rendering_queue.js +87 -108
- package/lib/web/pdf_sidebar.js +286 -302
- package/lib/web/pdf_sidebar_resizer.js +92 -119
- package/lib/web/pdf_single_page_viewer.js +77 -126
- package/lib/web/pdf_thumbnail_view.js +289 -297
- package/lib/web/pdf_thumbnail_viewer.js +202 -206
- package/lib/web/pdf_viewer.component.js +20 -21
- package/lib/web/pdf_viewer.js +55 -115
- package/lib/web/preferences.js +69 -273
- package/lib/web/secondary_toolbar.js +164 -196
- package/lib/web/text_layer_builder.js +284 -319
- package/lib/web/toolbar.js +217 -210
- package/lib/web/ui_utils.js +274 -421
- package/lib/web/view_history.js +52 -226
- package/lib/web/viewer_compatibility.js +21 -6
- package/package.json +4 -9
- package/types/display/annotation_layer.d.ts +61 -0
- package/types/display/annotation_storage.d.ts +36 -0
- package/types/display/api.d.ts +1107 -0
- package/types/display/api_compatibility.d.ts +1 -0
- package/types/display/canvas.d.ts +4 -0
- package/types/display/content_disposition.d.ts +7 -0
- package/types/display/display_utils.d.ts +243 -0
- package/types/display/fetch_stream.d.ts +67 -0
- package/types/display/font_loader.d.ts +19 -0
- package/types/display/metadata.d.ts +9 -0
- package/types/display/network.d.ts +80 -0
- package/types/display/network_utils.d.ts +14 -0
- package/types/display/node_stream.d.ts +72 -0
- package/types/display/node_utils.d.ts +6 -0
- package/types/display/optional_content_config.d.ts +12 -0
- package/types/display/pattern_helper.d.ts +5 -0
- package/types/display/svg.d.ts +2 -0
- package/types/display/text_layer.d.ts +83 -0
- package/types/display/transport_stream.d.ts +57 -0
- package/types/display/webgl.d.ts +20 -0
- package/types/display/worker_options.d.ts +27 -0
- package/types/display/xml_parser.d.ts +35 -0
- package/types/pdf.d.ts +33 -0
- package/types/shared/compatibility.d.ts +1 -0
- package/types/shared/is_node.d.ts +1 -0
- package/types/shared/message_handler.d.ts +62 -0
- package/types/shared/util.d.ts +421 -0
- package/web/images/shadow.png +0 -0
- package/web/pdf_viewer.css +29 -27
- package/web/pdf_viewer.js +3524 -4746
- package/web/pdf_viewer.js.map +1 -1
- package/webpack.js +6 -5
- package/external/streams/streams-lib.js +0 -3962
- package/external/url/url-lib.js +0 -627
- package/lib/shared/streams_polyfill.js +0 -43
- package/lib/shared/url_polyfill.js +0 -56
- package/web/images/texture.png +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2020 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -26,7 +26,7 @@ function xmlEncode(s) {
|
|
26
26
|
ch;
|
27
27
|
s = String(s);
|
28
28
|
|
29
|
-
while (i < s.length && (ch = s[i]) !==
|
29
|
+
while (i < s.length && (ch = s[i]) !== "&" && ch !== "<" && ch !== '"' && ch !== "\n" && ch !== "\r" && ch !== "\t") {
|
30
30
|
i++;
|
31
31
|
}
|
32
32
|
|
@@ -40,28 +40,28 @@ function xmlEncode(s) {
|
|
40
40
|
ch = s[i++];
|
41
41
|
|
42
42
|
switch (ch) {
|
43
|
-
case
|
44
|
-
buf +=
|
43
|
+
case "&":
|
44
|
+
buf += "&";
|
45
45
|
break;
|
46
46
|
|
47
|
-
case
|
48
|
-
buf +=
|
47
|
+
case "<":
|
48
|
+
buf += "<";
|
49
49
|
break;
|
50
50
|
|
51
|
-
case '
|
52
|
-
buf +=
|
51
|
+
case '"':
|
52
|
+
buf += """;
|
53
53
|
break;
|
54
54
|
|
55
|
-
case
|
56
|
-
buf +=
|
55
|
+
case "\n":
|
56
|
+
buf += "
";
|
57
57
|
break;
|
58
58
|
|
59
|
-
case
|
60
|
-
buf +=
|
59
|
+
case "\r":
|
60
|
+
buf += "
";
|
61
61
|
break;
|
62
62
|
|
63
|
-
case
|
64
|
-
buf +=
|
63
|
+
case "\t":
|
64
|
+
buf += "	";
|
65
65
|
break;
|
66
66
|
|
67
67
|
default:
|
@@ -77,12 +77,12 @@ function DOMElement(name) {
|
|
77
77
|
this.nodeName = name;
|
78
78
|
this.childNodes = [];
|
79
79
|
this.attributes = {};
|
80
|
-
this.textContent =
|
80
|
+
this.textContent = "";
|
81
81
|
|
82
|
-
if (name ===
|
82
|
+
if (name === "style") {
|
83
83
|
this.sheet = {
|
84
84
|
cssRules: [],
|
85
|
-
insertRule: function
|
85
|
+
insertRule: function (rule) {
|
86
86
|
this.cssRules.push(rule);
|
87
87
|
}
|
88
88
|
};
|
@@ -103,7 +103,7 @@ DOMElement.prototype = {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
if (NS) {
|
106
|
-
var suffix =
|
106
|
+
var suffix = ":" + name;
|
107
107
|
|
108
108
|
for (var fullName in this.attributes) {
|
109
109
|
if (fullName.slice(-suffix.length) === suffix) {
|
@@ -115,7 +115,7 @@ DOMElement.prototype = {
|
|
115
115
|
return null;
|
116
116
|
},
|
117
117
|
setAttribute: function DOMElement_setAttribute(name, value) {
|
118
|
-
value = value ||
|
118
|
+
value = value || "";
|
119
119
|
value = xmlEncode(value);
|
120
120
|
this.attributes[name] = value;
|
121
121
|
},
|
@@ -148,7 +148,7 @@ DOMElement.prototype = {
|
|
148
148
|
buf.push(chunk);
|
149
149
|
}
|
150
150
|
|
151
|
-
return buf.join(
|
151
|
+
return buf.join("");
|
152
152
|
},
|
153
153
|
getSerializer: function DOMElement_getSerializer() {
|
154
154
|
return new DOMElementSerializer(this);
|
@@ -170,12 +170,12 @@ DOMElementSerializer.prototype = {
|
|
170
170
|
switch (this._state) {
|
171
171
|
case 0:
|
172
172
|
++this._state;
|
173
|
-
return
|
173
|
+
return "<" + node.nodeName;
|
174
174
|
|
175
175
|
case 1:
|
176
176
|
++this._state;
|
177
177
|
|
178
|
-
if (node.nodeName ===
|
178
|
+
if (node.nodeName === "svg:svg") {
|
179
179
|
return ' xmlns:xlink="http://www.w3.org/1999/xlink"' + ' xmlns:svg="http://www.w3.org/2000/svg"';
|
180
180
|
}
|
181
181
|
|
@@ -187,14 +187,14 @@ DOMElementSerializer.prototype = {
|
|
187
187
|
case 3:
|
188
188
|
if (this._loopIndex < this._attributeKeys.length) {
|
189
189
|
var name = this._attributeKeys[this._loopIndex++];
|
190
|
-
return
|
190
|
+
return " " + name + '="' + xmlEncode(node.attributes[name]) + '"';
|
191
191
|
}
|
192
192
|
|
193
193
|
++this._state;
|
194
|
-
return
|
194
|
+
return ">";
|
195
195
|
|
196
196
|
case 4:
|
197
|
-
if (node.nodeName ===
|
197
|
+
if (node.nodeName === "svg:tspan" || node.nodeName === "svg:style") {
|
198
198
|
this._state = 6;
|
199
199
|
return xmlEncode(node.textContent);
|
200
200
|
}
|
@@ -225,22 +225,22 @@ DOMElementSerializer.prototype = {
|
|
225
225
|
|
226
226
|
case 6:
|
227
227
|
++this._state;
|
228
|
-
return
|
228
|
+
return "</" + node.nodeName + ">";
|
229
229
|
|
230
230
|
case 7:
|
231
231
|
return null;
|
232
232
|
|
233
233
|
default:
|
234
|
-
throw new Error(
|
234
|
+
throw new Error("Unexpected serialization state: " + this._state);
|
235
235
|
}
|
236
236
|
}
|
237
237
|
};
|
238
|
-
|
238
|
+
const document = {
|
239
239
|
childNodes: [],
|
240
240
|
|
241
241
|
get currentScript() {
|
242
242
|
return {
|
243
|
-
src:
|
243
|
+
src: ""
|
244
244
|
};
|
245
245
|
},
|
246
246
|
|
@@ -248,16 +248,16 @@ var document = {
|
|
248
248
|
return this;
|
249
249
|
},
|
250
250
|
|
251
|
-
createElementNS: function
|
251
|
+
createElementNS: function (NS, element) {
|
252
252
|
var elObject = new DOMElement(element);
|
253
253
|
return elObject;
|
254
254
|
},
|
255
|
-
createElement: function
|
256
|
-
return this.createElementNS(
|
255
|
+
createElement: function (element) {
|
256
|
+
return this.createElementNS("", element);
|
257
257
|
},
|
258
|
-
getElementsByTagName: function
|
259
|
-
if (element ===
|
260
|
-
return [this.head || (this.head = new DOMElement(
|
258
|
+
getElementsByTagName: function (element) {
|
259
|
+
if (element === "head") {
|
260
|
+
return [this.head || (this.head = new DOMElement("head"))];
|
261
261
|
}
|
262
262
|
|
263
263
|
return [];
|
@@ -289,14 +289,14 @@ var exported_symbols = Object.keys(exports);
|
|
289
289
|
|
290
290
|
exports.setStubs = function (namespace) {
|
291
291
|
exported_symbols.forEach(function (key) {
|
292
|
-
console.assert(!(key in namespace),
|
292
|
+
console.assert(!(key in namespace), "property should not be set: " + key);
|
293
293
|
namespace[key] = exports[key];
|
294
294
|
});
|
295
295
|
};
|
296
296
|
|
297
297
|
exports.unsetStubs = function (namespace) {
|
298
298
|
exported_symbols.forEach(function (key) {
|
299
|
-
console.assert(key in namespace,
|
299
|
+
console.assert(key in namespace, "property should be set: " + key);
|
300
300
|
delete namespace[key];
|
301
301
|
});
|
302
302
|
};
|
package/lib/pdf.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2020 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -19,86 +19,248 @@
|
|
19
19
|
* @licend The above is the entire license notice for the
|
20
20
|
* Javascript code in this page
|
21
21
|
*/
|
22
|
-
|
22
|
+
"use strict";
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
25
|
+
value: true
|
26
|
+
});
|
27
|
+
Object.defineProperty(exports, "addLinkAttributes", {
|
28
|
+
enumerable: true,
|
29
|
+
get: function () {
|
30
|
+
return _display_utils.addLinkAttributes;
|
31
|
+
}
|
32
|
+
});
|
33
|
+
Object.defineProperty(exports, "getFilenameFromUrl", {
|
34
|
+
enumerable: true,
|
35
|
+
get: function () {
|
36
|
+
return _display_utils.getFilenameFromUrl;
|
37
|
+
}
|
38
|
+
});
|
39
|
+
Object.defineProperty(exports, "LinkTarget", {
|
40
|
+
enumerable: true,
|
41
|
+
get: function () {
|
42
|
+
return _display_utils.LinkTarget;
|
43
|
+
}
|
44
|
+
});
|
45
|
+
Object.defineProperty(exports, "loadScript", {
|
46
|
+
enumerable: true,
|
47
|
+
get: function () {
|
48
|
+
return _display_utils.loadScript;
|
49
|
+
}
|
50
|
+
});
|
51
|
+
Object.defineProperty(exports, "PDFDateString", {
|
52
|
+
enumerable: true,
|
53
|
+
get: function () {
|
54
|
+
return _display_utils.PDFDateString;
|
55
|
+
}
|
56
|
+
});
|
57
|
+
Object.defineProperty(exports, "RenderingCancelledException", {
|
58
|
+
enumerable: true,
|
59
|
+
get: function () {
|
60
|
+
return _display_utils.RenderingCancelledException;
|
61
|
+
}
|
62
|
+
});
|
63
|
+
Object.defineProperty(exports, "build", {
|
64
|
+
enumerable: true,
|
65
|
+
get: function () {
|
66
|
+
return _api.build;
|
67
|
+
}
|
68
|
+
});
|
69
|
+
Object.defineProperty(exports, "getDocument", {
|
70
|
+
enumerable: true,
|
71
|
+
get: function () {
|
72
|
+
return _api.getDocument;
|
73
|
+
}
|
74
|
+
});
|
75
|
+
Object.defineProperty(exports, "LoopbackPort", {
|
76
|
+
enumerable: true,
|
77
|
+
get: function () {
|
78
|
+
return _api.LoopbackPort;
|
79
|
+
}
|
80
|
+
});
|
81
|
+
Object.defineProperty(exports, "PDFDataRangeTransport", {
|
82
|
+
enumerable: true,
|
83
|
+
get: function () {
|
84
|
+
return _api.PDFDataRangeTransport;
|
85
|
+
}
|
86
|
+
});
|
87
|
+
Object.defineProperty(exports, "PDFWorker", {
|
88
|
+
enumerable: true,
|
89
|
+
get: function () {
|
90
|
+
return _api.PDFWorker;
|
91
|
+
}
|
92
|
+
});
|
93
|
+
Object.defineProperty(exports, "version", {
|
94
|
+
enumerable: true,
|
95
|
+
get: function () {
|
96
|
+
return _api.version;
|
97
|
+
}
|
98
|
+
});
|
99
|
+
Object.defineProperty(exports, "CMapCompressionType", {
|
100
|
+
enumerable: true,
|
101
|
+
get: function () {
|
102
|
+
return _util.CMapCompressionType;
|
103
|
+
}
|
104
|
+
});
|
105
|
+
Object.defineProperty(exports, "createObjectURL", {
|
106
|
+
enumerable: true,
|
107
|
+
get: function () {
|
108
|
+
return _util.createObjectURL;
|
109
|
+
}
|
110
|
+
});
|
111
|
+
Object.defineProperty(exports, "createPromiseCapability", {
|
112
|
+
enumerable: true,
|
113
|
+
get: function () {
|
114
|
+
return _util.createPromiseCapability;
|
115
|
+
}
|
116
|
+
});
|
117
|
+
Object.defineProperty(exports, "createValidAbsoluteUrl", {
|
118
|
+
enumerable: true,
|
119
|
+
get: function () {
|
120
|
+
return _util.createValidAbsoluteUrl;
|
121
|
+
}
|
122
|
+
});
|
123
|
+
Object.defineProperty(exports, "InvalidPDFException", {
|
124
|
+
enumerable: true,
|
125
|
+
get: function () {
|
126
|
+
return _util.InvalidPDFException;
|
127
|
+
}
|
128
|
+
});
|
129
|
+
Object.defineProperty(exports, "MissingPDFException", {
|
130
|
+
enumerable: true,
|
131
|
+
get: function () {
|
132
|
+
return _util.MissingPDFException;
|
133
|
+
}
|
134
|
+
});
|
135
|
+
Object.defineProperty(exports, "OPS", {
|
136
|
+
enumerable: true,
|
137
|
+
get: function () {
|
138
|
+
return _util.OPS;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
Object.defineProperty(exports, "PasswordResponses", {
|
142
|
+
enumerable: true,
|
143
|
+
get: function () {
|
144
|
+
return _util.PasswordResponses;
|
145
|
+
}
|
146
|
+
});
|
147
|
+
Object.defineProperty(exports, "PermissionFlag", {
|
148
|
+
enumerable: true,
|
149
|
+
get: function () {
|
150
|
+
return _util.PermissionFlag;
|
151
|
+
}
|
152
|
+
});
|
153
|
+
Object.defineProperty(exports, "removeNullCharacters", {
|
154
|
+
enumerable: true,
|
155
|
+
get: function () {
|
156
|
+
return _util.removeNullCharacters;
|
157
|
+
}
|
158
|
+
});
|
159
|
+
Object.defineProperty(exports, "shadow", {
|
160
|
+
enumerable: true,
|
161
|
+
get: function () {
|
162
|
+
return _util.shadow;
|
163
|
+
}
|
164
|
+
});
|
165
|
+
Object.defineProperty(exports, "UnexpectedResponseException", {
|
166
|
+
enumerable: true,
|
167
|
+
get: function () {
|
168
|
+
return _util.UnexpectedResponseException;
|
169
|
+
}
|
170
|
+
});
|
171
|
+
Object.defineProperty(exports, "UNSUPPORTED_FEATURES", {
|
172
|
+
enumerable: true,
|
173
|
+
get: function () {
|
174
|
+
return _util.UNSUPPORTED_FEATURES;
|
175
|
+
}
|
176
|
+
});
|
177
|
+
Object.defineProperty(exports, "Util", {
|
178
|
+
enumerable: true,
|
179
|
+
get: function () {
|
180
|
+
return _util.Util;
|
181
|
+
}
|
182
|
+
});
|
183
|
+
Object.defineProperty(exports, "VerbosityLevel", {
|
184
|
+
enumerable: true,
|
185
|
+
get: function () {
|
186
|
+
return _util.VerbosityLevel;
|
187
|
+
}
|
188
|
+
});
|
189
|
+
Object.defineProperty(exports, "AnnotationLayer", {
|
190
|
+
enumerable: true,
|
191
|
+
get: function () {
|
192
|
+
return _annotation_layer.AnnotationLayer;
|
193
|
+
}
|
194
|
+
});
|
195
|
+
Object.defineProperty(exports, "apiCompatibilityParams", {
|
196
|
+
enumerable: true,
|
197
|
+
get: function () {
|
198
|
+
return _api_compatibility.apiCompatibilityParams;
|
199
|
+
}
|
200
|
+
});
|
201
|
+
Object.defineProperty(exports, "GlobalWorkerOptions", {
|
202
|
+
enumerable: true,
|
203
|
+
get: function () {
|
204
|
+
return _worker_options.GlobalWorkerOptions;
|
205
|
+
}
|
206
|
+
});
|
207
|
+
Object.defineProperty(exports, "renderTextLayer", {
|
208
|
+
enumerable: true,
|
209
|
+
get: function () {
|
210
|
+
return _text_layer.renderTextLayer;
|
211
|
+
}
|
212
|
+
});
|
213
|
+
Object.defineProperty(exports, "SVGGraphics", {
|
214
|
+
enumerable: true,
|
215
|
+
get: function () {
|
216
|
+
return _svg.SVGGraphics;
|
217
|
+
}
|
218
|
+
});
|
26
219
|
|
27
|
-
var
|
220
|
+
var _display_utils = require("./display/display_utils.js");
|
28
221
|
|
29
|
-
var
|
222
|
+
var _api = require("./display/api.js");
|
30
223
|
|
31
|
-
var
|
224
|
+
var _util = require("./shared/util.js");
|
32
225
|
|
33
|
-
var
|
226
|
+
var _annotation_layer = require("./display/annotation_layer.js");
|
34
227
|
|
35
|
-
var
|
228
|
+
var _api_compatibility = require("./display/api_compatibility.js");
|
36
229
|
|
37
|
-
var
|
230
|
+
var _worker_options = require("./display/worker_options.js");
|
38
231
|
|
39
|
-
var
|
232
|
+
var _text_layer = require("./display/text_layer.js");
|
40
233
|
|
41
|
-
var
|
234
|
+
var _svg = require("./display/svg.js");
|
42
235
|
|
236
|
+
const pdfjsVersion = '2.6.347';
|
237
|
+
const pdfjsBuild = '3be9c65f';
|
43
238
|
{
|
44
|
-
|
239
|
+
const {
|
240
|
+
isNodeJS
|
241
|
+
} = require("./shared/is_node.js");
|
45
242
|
|
46
|
-
if (isNodeJS
|
47
|
-
|
243
|
+
if (isNodeJS) {
|
244
|
+
const PDFNodeStream = require("./display/node_stream.js").PDFNodeStream;
|
48
245
|
|
49
|
-
|
246
|
+
(0, _api.setPDFNetworkStreamFactory)(params => {
|
50
247
|
return new PDFNodeStream(params);
|
51
248
|
});
|
52
249
|
} else {
|
53
|
-
|
250
|
+
const PDFNetworkStream = require("./display/network.js").PDFNetworkStream;
|
54
251
|
|
55
|
-
|
252
|
+
let PDFFetchStream;
|
56
253
|
|
57
|
-
if (
|
58
|
-
PDFFetchStream = require(
|
254
|
+
if ((0, _display_utils.isFetchSupported)()) {
|
255
|
+
PDFFetchStream = require("./display/fetch_stream.js").PDFFetchStream;
|
59
256
|
}
|
60
257
|
|
61
|
-
|
62
|
-
if (PDFFetchStream &&
|
258
|
+
(0, _api.setPDFNetworkStreamFactory)(params => {
|
259
|
+
if (PDFFetchStream && (0, _display_utils.isValidFetchUrl)(params.url)) {
|
63
260
|
return new PDFFetchStream(params);
|
64
261
|
}
|
65
262
|
|
66
263
|
return new PDFNetworkStream(params);
|
67
264
|
});
|
68
265
|
}
|
69
|
-
}
|
70
|
-
exports.build = pdfjsDisplayAPI.build;
|
71
|
-
exports.version = pdfjsDisplayAPI.version;
|
72
|
-
exports.getDocument = pdfjsDisplayAPI.getDocument;
|
73
|
-
exports.LoopbackPort = pdfjsDisplayAPI.LoopbackPort;
|
74
|
-
exports.PDFDataRangeTransport = pdfjsDisplayAPI.PDFDataRangeTransport;
|
75
|
-
exports.PDFWorker = pdfjsDisplayAPI.PDFWorker;
|
76
|
-
exports.renderTextLayer = pdfjsDisplayTextLayer.renderTextLayer;
|
77
|
-
exports.AnnotationLayer = pdfjsDisplayAnnotationLayer.AnnotationLayer;
|
78
|
-
exports.createPromiseCapability = pdfjsSharedUtil.createPromiseCapability;
|
79
|
-
exports.PasswordResponses = pdfjsSharedUtil.PasswordResponses;
|
80
|
-
exports.InvalidPDFException = pdfjsSharedUtil.InvalidPDFException;
|
81
|
-
exports.MissingPDFException = pdfjsSharedUtil.MissingPDFException;
|
82
|
-
exports.SVGGraphics = pdfjsDisplaySVG.SVGGraphics;
|
83
|
-
exports.NativeImageDecoding = pdfjsSharedUtil.NativeImageDecoding;
|
84
|
-
exports.CMapCompressionType = pdfjsSharedUtil.CMapCompressionType;
|
85
|
-
exports.PermissionFlag = pdfjsSharedUtil.PermissionFlag;
|
86
|
-
exports.UnexpectedResponseException = pdfjsSharedUtil.UnexpectedResponseException;
|
87
|
-
exports.OPS = pdfjsSharedUtil.OPS;
|
88
|
-
exports.VerbosityLevel = pdfjsSharedUtil.VerbosityLevel;
|
89
|
-
exports.UNSUPPORTED_FEATURES = pdfjsSharedUtil.UNSUPPORTED_FEATURES;
|
90
|
-
exports.createValidAbsoluteUrl = pdfjsSharedUtil.createValidAbsoluteUrl;
|
91
|
-
exports.createObjectURL = pdfjsSharedUtil.createObjectURL;
|
92
|
-
exports.removeNullCharacters = pdfjsSharedUtil.removeNullCharacters;
|
93
|
-
exports.shadow = pdfjsSharedUtil.shadow;
|
94
|
-
exports.Util = pdfjsSharedUtil.Util;
|
95
|
-
exports.ReadableStream = pdfjsSharedUtil.ReadableStream;
|
96
|
-
exports.URL = pdfjsSharedUtil.URL;
|
97
|
-
exports.RenderingCancelledException = pdfjsDisplayDisplayUtils.RenderingCancelledException;
|
98
|
-
exports.getFilenameFromUrl = pdfjsDisplayDisplayUtils.getFilenameFromUrl;
|
99
|
-
exports.LinkTarget = pdfjsDisplayDisplayUtils.LinkTarget;
|
100
|
-
exports.addLinkAttributes = pdfjsDisplayDisplayUtils.addLinkAttributes;
|
101
|
-
exports.loadScript = pdfjsDisplayDisplayUtils.loadScript;
|
102
|
-
exports.PDFDateString = pdfjsDisplayDisplayUtils.PDFDateString;
|
103
|
-
exports.GlobalWorkerOptions = pdfjsDisplayWorkerOptions.GlobalWorkerOptions;
|
104
|
-
exports.apiCompatibilityParams = pdfjsDisplayAPICompatibility.apiCompatibilityParams;
|
266
|
+
}
|
package/lib/pdf.worker.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2020 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -19,11 +19,19 @@
|
|
19
19
|
* @licend The above is the entire license notice for the
|
20
20
|
* Javascript code in this page
|
21
21
|
*/
|
22
|
-
|
22
|
+
"use strict";
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
25
|
+
value: true
|
26
|
+
});
|
27
|
+
Object.defineProperty(exports, "WorkerMessageHandler", {
|
28
|
+
enumerable: true,
|
29
|
+
get: function () {
|
30
|
+
return _worker.WorkerMessageHandler;
|
31
|
+
}
|
32
|
+
});
|
26
33
|
|
27
|
-
var
|
34
|
+
var _worker = require("./core/worker.js");
|
28
35
|
|
29
|
-
|
36
|
+
const pdfjsVersion = '2.6.347';
|
37
|
+
const pdfjsBuild = '3be9c65f';
|