Spaces:
Sleeping
Sleeping
pdf.js
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Copyright 2012 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 |
+
// eslint-disable-next-line max-len
|
17 |
+
/** @typedef {import("./display/api").OnProgressParameters} OnProgressParameters */
|
18 |
+
// eslint-disable-next-line max-len
|
19 |
+
/** @typedef {import("./display/api").PDFDocumentLoadingTask} PDFDocumentLoadingTask */
|
20 |
+
/** @typedef {import("./display/api").PDFDocumentProxy} PDFDocumentProxy */
|
21 |
+
/** @typedef {import("./display/api").PDFPageProxy} PDFPageProxy */
|
22 |
+
/** @typedef {import("./display/api").RenderTask} RenderTask */
|
23 |
+
/** @typedef {import("./display/display_utils").PageViewport} PageViewport */
|
24 |
+
|
25 |
+
import {
|
26 |
+
AbortException,
|
27 |
+
AnnotationEditorParamsType,
|
28 |
+
AnnotationEditorType,
|
29 |
+
AnnotationMode,
|
30 |
+
createValidAbsoluteUrl,
|
31 |
+
FeatureTest,
|
32 |
+
ImageKind,
|
33 |
+
InvalidPDFException,
|
34 |
+
MissingPDFException,
|
35 |
+
normalizeUnicode,
|
36 |
+
OPS,
|
37 |
+
PasswordResponses,
|
38 |
+
PermissionFlag,
|
39 |
+
shadow,
|
40 |
+
UnexpectedResponseException,
|
41 |
+
Util,
|
42 |
+
VerbosityLevel,
|
43 |
+
} from "./shared/util.js";
|
44 |
+
import {
|
45 |
+
build,
|
46 |
+
getDocument,
|
47 |
+
PDFDataRangeTransport,
|
48 |
+
PDFWorker,
|
49 |
+
version,
|
50 |
+
} from "./display/api.js";
|
51 |
+
import {
|
52 |
+
fetchData,
|
53 |
+
getFilenameFromUrl,
|
54 |
+
getPdfFilenameFromUrl,
|
55 |
+
getXfaPageViewport,
|
56 |
+
isDataScheme,
|
57 |
+
isPdfFile,
|
58 |
+
noContextMenu,
|
59 |
+
OutputScale,
|
60 |
+
PDFDateString,
|
61 |
+
PixelsPerInch,
|
62 |
+
RenderingCancelledException,
|
63 |
+
setLayerDimensions,
|
64 |
+
stopEvent,
|
65 |
+
} from "./display/display_utils.js";
|
66 |
+
import { AnnotationEditorLayer } from "./display/editor/annotation_editor_layer.js";
|
67 |
+
import { AnnotationEditorUIManager } from "./display/editor/tools.js";
|
68 |
+
import { AnnotationLayer } from "./display/annotation_layer.js";
|
69 |
+
import { ColorPicker } from "./display/editor/color_picker.js";
|
70 |
+
import { DOMSVGFactory } from "./display/svg_factory.js";
|
71 |
+
import { DrawLayer } from "./display/draw_layer.js";
|
72 |
+
import { GlobalWorkerOptions } from "./display/worker_options.js";
|
73 |
+
import { HighlightOutliner } from "./display/editor/drawers/highlight.js";
|
74 |
+
import { TextLayer } from "./display/text_layer.js";
|
75 |
+
import { XfaLayer } from "./display/xfa_layer.js";
|
76 |
+
|
77 |
+
/* eslint-disable-next-line no-unused-vars */
|
78 |
+
const pdfjsVersion =
|
79 |
+
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_VERSION") : void 0;
|
80 |
+
/* eslint-disable-next-line no-unused-vars */
|
81 |
+
const pdfjsBuild =
|
82 |
+
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : void 0;
|
83 |
+
|
84 |
+
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING || GENERIC")) {
|
85 |
+
globalThis.pdfjsTestingUtils = {
|
86 |
+
HighlightOutliner,
|
87 |
+
};
|
88 |
+
}
|
89 |
+
|
90 |
+
export {
|
91 |
+
AbortException,
|
92 |
+
AnnotationEditorLayer,
|
93 |
+
AnnotationEditorParamsType,
|
94 |
+
AnnotationEditorType,
|
95 |
+
AnnotationEditorUIManager,
|
96 |
+
AnnotationLayer,
|
97 |
+
AnnotationMode,
|
98 |
+
build,
|
99 |
+
ColorPicker,
|
100 |
+
createValidAbsoluteUrl,
|
101 |
+
DOMSVGFactory,
|
102 |
+
DrawLayer,
|
103 |
+
FeatureTest,
|
104 |
+
fetchData,
|
105 |
+
getDocument,
|
106 |
+
getFilenameFromUrl,
|
107 |
+
getPdfFilenameFromUrl,
|
108 |
+
getXfaPageViewport,
|
109 |
+
GlobalWorkerOptions,
|
110 |
+
ImageKind,
|
111 |
+
InvalidPDFException,
|
112 |
+
isDataScheme,
|
113 |
+
isPdfFile,
|
114 |
+
MissingPDFException,
|
115 |
+
noContextMenu,
|
116 |
+
normalizeUnicode,
|
117 |
+
OPS,
|
118 |
+
OutputScale,
|
119 |
+
PasswordResponses,
|
120 |
+
PDFDataRangeTransport,
|
121 |
+
PDFDateString,
|
122 |
+
PDFWorker,
|
123 |
+
PermissionFlag,
|
124 |
+
PixelsPerInch,
|
125 |
+
RenderingCancelledException,
|
126 |
+
setLayerDimensions,
|
127 |
+
shadow,
|
128 |
+
stopEvent,
|
129 |
+
TextLayer,
|
130 |
+
UnexpectedResponseException,
|
131 |
+
Util,
|
132 |
+
VerbosityLevel,
|
133 |
+
version,
|
134 |
+
XfaLayer,
|
135 |
+
};
|