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
@@ -0,0 +1,57 @@
|
|
1
|
+
/** @implements {IPDFStream} */
|
2
|
+
export class PDFDataTransportStream {
|
3
|
+
constructor(params: any, pdfDataRangeTransport: any);
|
4
|
+
_queuedChunks: any[];
|
5
|
+
_progressiveDone: any;
|
6
|
+
_pdfDataRangeTransport: any;
|
7
|
+
_isStreamingSupported: boolean;
|
8
|
+
_isRangeSupported: boolean;
|
9
|
+
_contentLength: any;
|
10
|
+
_fullRequestReader: any;
|
11
|
+
_rangeReaders: any[];
|
12
|
+
_onReceiveData(args: any): void;
|
13
|
+
get _progressiveDataLength(): any;
|
14
|
+
_onProgress(evt: any): void;
|
15
|
+
_onProgressiveDone(): void;
|
16
|
+
_removeRangeReader(reader: any): void;
|
17
|
+
getFullReader(): PDFDataTransportStreamReader;
|
18
|
+
getRangeReader(begin: any, end: any): PDFDataTransportStreamRangeReader | null;
|
19
|
+
cancelAllRequests(reason: any): void;
|
20
|
+
}
|
21
|
+
/** @implements {IPDFStreamReader} */
|
22
|
+
declare class PDFDataTransportStreamReader {
|
23
|
+
constructor(stream: any, queuedChunks: any, progressiveDone?: boolean);
|
24
|
+
_stream: any;
|
25
|
+
_done: boolean;
|
26
|
+
_filename: any;
|
27
|
+
_queuedChunks: any;
|
28
|
+
_loaded: number;
|
29
|
+
_requests: any[];
|
30
|
+
_headersReady: Promise<void>;
|
31
|
+
onProgress: any;
|
32
|
+
_enqueue(chunk: any): void;
|
33
|
+
get headersReady(): Promise<void>;
|
34
|
+
get filename(): any;
|
35
|
+
get isRangeSupported(): any;
|
36
|
+
get isStreamingSupported(): any;
|
37
|
+
get contentLength(): any;
|
38
|
+
read(): Promise<any>;
|
39
|
+
cancel(reason: any): void;
|
40
|
+
progressiveDone(): void;
|
41
|
+
}
|
42
|
+
/** @implements {IPDFStreamRangeReader} */
|
43
|
+
declare class PDFDataTransportStreamRangeReader {
|
44
|
+
constructor(stream: any, begin: any, end: any);
|
45
|
+
_stream: any;
|
46
|
+
_begin: any;
|
47
|
+
_end: any;
|
48
|
+
_queuedChunk: any;
|
49
|
+
_requests: any[];
|
50
|
+
_done: boolean;
|
51
|
+
onProgress: any;
|
52
|
+
_enqueue(chunk: any): void;
|
53
|
+
get isStreamingSupported(): boolean;
|
54
|
+
read(): Promise<any>;
|
55
|
+
cancel(reason: any): void;
|
56
|
+
}
|
57
|
+
export {};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export class WebGLContext {
|
2
|
+
constructor({ enable }: {
|
3
|
+
enable?: boolean | undefined;
|
4
|
+
});
|
5
|
+
_enabled: boolean;
|
6
|
+
get isEnabled(): any;
|
7
|
+
composeSMask({ layer, mask, properties }: {
|
8
|
+
layer: any;
|
9
|
+
mask: any;
|
10
|
+
properties: any;
|
11
|
+
}): any;
|
12
|
+
drawFigures({ width, height, backgroundColor, figures, context }: {
|
13
|
+
width: any;
|
14
|
+
height: any;
|
15
|
+
backgroundColor: any;
|
16
|
+
figures: any;
|
17
|
+
context: any;
|
18
|
+
}): any;
|
19
|
+
clear(): void;
|
20
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export type GlobalWorkerOptionsType = {
|
2
|
+
/**
|
3
|
+
* - Defines global port for worker
|
4
|
+
* process. Overrides the `workerSrc` option.
|
5
|
+
*/
|
6
|
+
workerPort: Worker | null;
|
7
|
+
/**
|
8
|
+
* - A string containing the path and filename
|
9
|
+
* of the worker file.
|
10
|
+
*
|
11
|
+
* NOTE: The `workerSrc` option should always be set, in order to prevent any
|
12
|
+
* issues when using the PDF.js library.
|
13
|
+
*/
|
14
|
+
workerSrc: string;
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* @typedef {Object} GlobalWorkerOptionsType
|
18
|
+
* @property {Worker | null} workerPort - Defines global port for worker
|
19
|
+
* process. Overrides the `workerSrc` option.
|
20
|
+
* @property {string} workerSrc - A string containing the path and filename
|
21
|
+
* of the worker file.
|
22
|
+
*
|
23
|
+
* NOTE: The `workerSrc` option should always be set, in order to prevent any
|
24
|
+
* issues when using the PDF.js library.
|
25
|
+
*/
|
26
|
+
/** @type {GlobalWorkerOptionsType} */
|
27
|
+
export const GlobalWorkerOptions: GlobalWorkerOptionsType;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export class SimpleXMLParser extends XMLParserBase {
|
2
|
+
_currentFragment: any;
|
3
|
+
_stack: any[] | null;
|
4
|
+
_errorCode: number;
|
5
|
+
parseFromString(data: any): {
|
6
|
+
documentElement: any;
|
7
|
+
} | undefined;
|
8
|
+
}
|
9
|
+
declare class XMLParserBase {
|
10
|
+
_resolveEntities(s: any): any;
|
11
|
+
_parseContent(s: any, start: any): {
|
12
|
+
name: any;
|
13
|
+
attributes: {
|
14
|
+
name: string;
|
15
|
+
value: any;
|
16
|
+
}[];
|
17
|
+
parsed: number;
|
18
|
+
} | null;
|
19
|
+
_parseProcessingInstruction(s: any, start: any): {
|
20
|
+
name: any;
|
21
|
+
value: any;
|
22
|
+
parsed: number;
|
23
|
+
};
|
24
|
+
parseXml(s: any): void;
|
25
|
+
onResolveEntity(name: any): string;
|
26
|
+
onPi(name: any, value: any): void;
|
27
|
+
onComment(text: any): void;
|
28
|
+
onCdata(text: any): void;
|
29
|
+
onDoctype(doctypeContent: any): void;
|
30
|
+
onText(text: any): void;
|
31
|
+
onBeginElement(name: any, attributes: any, isEmpty: any): void;
|
32
|
+
onEndElement(name: any): void;
|
33
|
+
onError(code: any): void;
|
34
|
+
}
|
35
|
+
export {};
|
package/types/pdf.d.ts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { addLinkAttributes } from "./display/display_utils.js";
|
2
|
+
import { getFilenameFromUrl } from "./display/display_utils.js";
|
3
|
+
import { LinkTarget } from "./display/display_utils.js";
|
4
|
+
import { loadScript } from "./display/display_utils.js";
|
5
|
+
import { PDFDateString } from "./display/display_utils.js";
|
6
|
+
import { RenderingCancelledException } from "./display/display_utils.js";
|
7
|
+
import { build } from "./display/api.js";
|
8
|
+
import { getDocument } from "./display/api.js";
|
9
|
+
import { LoopbackPort } from "./display/api.js";
|
10
|
+
import { PDFDataRangeTransport } from "./display/api.js";
|
11
|
+
import { PDFWorker } from "./display/api.js";
|
12
|
+
import { version } from "./display/api.js";
|
13
|
+
import { CMapCompressionType } from "./shared/util.js";
|
14
|
+
import { createObjectURL } from "./shared/util.js";
|
15
|
+
import { createPromiseCapability } from "./shared/util.js";
|
16
|
+
import { createValidAbsoluteUrl } from "./shared/util.js";
|
17
|
+
import { InvalidPDFException } from "./shared/util.js";
|
18
|
+
import { MissingPDFException } from "./shared/util.js";
|
19
|
+
import { OPS } from "./shared/util.js";
|
20
|
+
import { PasswordResponses } from "./shared/util.js";
|
21
|
+
import { PermissionFlag } from "./shared/util.js";
|
22
|
+
import { removeNullCharacters } from "./shared/util.js";
|
23
|
+
import { shadow } from "./shared/util.js";
|
24
|
+
import { UnexpectedResponseException } from "./shared/util.js";
|
25
|
+
import { UNSUPPORTED_FEATURES } from "./shared/util.js";
|
26
|
+
import { Util } from "./shared/util.js";
|
27
|
+
import { VerbosityLevel } from "./shared/util.js";
|
28
|
+
import { AnnotationLayer } from "./display/annotation_layer.js";
|
29
|
+
import { apiCompatibilityParams } from "./display/api_compatibility.js";
|
30
|
+
import { GlobalWorkerOptions } from "./display/worker_options.js";
|
31
|
+
import { renderTextLayer } from "./display/text_layer.js";
|
32
|
+
import { SVGGraphics } from "./display/svg.js";
|
33
|
+
export { addLinkAttributes, getFilenameFromUrl, LinkTarget, loadScript, PDFDateString, RenderingCancelledException, build, getDocument, LoopbackPort, PDFDataRangeTransport, PDFWorker, version, CMapCompressionType, createObjectURL, createPromiseCapability, createValidAbsoluteUrl, InvalidPDFException, MissingPDFException, OPS, PasswordResponses, PermissionFlag, removeNullCharacters, shadow, UnexpectedResponseException, UNSUPPORTED_FEATURES, Util, VerbosityLevel, AnnotationLayer, apiCompatibilityParams, GlobalWorkerOptions, renderTextLayer, SVGGraphics };
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export const isNodeJS: boolean;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
export class MessageHandler {
|
2
|
+
constructor(sourceName: any, targetName: any, comObj: any);
|
3
|
+
sourceName: any;
|
4
|
+
targetName: any;
|
5
|
+
comObj: any;
|
6
|
+
callbackId: number;
|
7
|
+
streamId: number;
|
8
|
+
postMessageTransfers: boolean;
|
9
|
+
streamSinks: any;
|
10
|
+
streamControllers: any;
|
11
|
+
callbackCapabilities: any;
|
12
|
+
actionHandler: any;
|
13
|
+
_onComObjOnMessage: (event: any) => void;
|
14
|
+
on(actionName: any, handler: any): void;
|
15
|
+
/**
|
16
|
+
* Sends a message to the comObj to invoke the action with the supplied data.
|
17
|
+
* @param {string} actionName - Action to call.
|
18
|
+
* @param {JSON} data - JSON data to send.
|
19
|
+
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
20
|
+
*/
|
21
|
+
send(actionName: string, data: JSON, transfers?: any[] | undefined): void;
|
22
|
+
/**
|
23
|
+
* Sends a message to the comObj to invoke the action with the supplied data.
|
24
|
+
* Expects that the other side will callback with the response.
|
25
|
+
* @param {string} actionName - Action to call.
|
26
|
+
* @param {JSON} data - JSON data to send.
|
27
|
+
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
28
|
+
* @returns {Promise} Promise to be resolved with response data.
|
29
|
+
*/
|
30
|
+
sendWithPromise(actionName: string, data: JSON, transfers?: any[] | undefined): Promise<any>;
|
31
|
+
/**
|
32
|
+
* Sends a message to the comObj to invoke the action with the supplied data.
|
33
|
+
* Expect that the other side will callback to signal 'start_complete'.
|
34
|
+
* @param {string} actionName - Action to call.
|
35
|
+
* @param {JSON} data - JSON data to send.
|
36
|
+
* @param {Object} queueingStrategy - Strategy to signal backpressure based on
|
37
|
+
* internal queue.
|
38
|
+
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
39
|
+
* @returns {ReadableStream} ReadableStream to read data in chunks.
|
40
|
+
*/
|
41
|
+
sendWithStream(actionName: string, data: JSON, queueingStrategy: Object, transfers?: any[] | undefined): ReadableStream;
|
42
|
+
/**
|
43
|
+
* @private
|
44
|
+
*/
|
45
|
+
private _createStreamSink;
|
46
|
+
/**
|
47
|
+
* @private
|
48
|
+
*/
|
49
|
+
private _processStreamMessage;
|
50
|
+
/**
|
51
|
+
* @private
|
52
|
+
*/
|
53
|
+
private _deleteStreamController;
|
54
|
+
/**
|
55
|
+
* Sends raw message to the comObj.
|
56
|
+
* @param {Object} message - Raw message.
|
57
|
+
* @param transfers List of transfers/ArrayBuffers, or undefined.
|
58
|
+
* @private
|
59
|
+
*/
|
60
|
+
private _postMessage;
|
61
|
+
destroy(): void;
|
62
|
+
}
|
@@ -0,0 +1,421 @@
|
|
1
|
+
/**
|
2
|
+
* Promise Capability object.
|
3
|
+
*/
|
4
|
+
export type PromiseCapability = {
|
5
|
+
/**
|
6
|
+
* - A Promise object.
|
7
|
+
*/
|
8
|
+
promise: Promise<any>;
|
9
|
+
/**
|
10
|
+
* - If the Promise has been fulfilled/rejected.
|
11
|
+
*/
|
12
|
+
settled: boolean;
|
13
|
+
/**
|
14
|
+
* - Fulfills the Promise.
|
15
|
+
*/
|
16
|
+
resolve: Function;
|
17
|
+
/**
|
18
|
+
* - Rejects the Promise.
|
19
|
+
*/
|
20
|
+
reject: Function;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* @type {any}
|
24
|
+
*/
|
25
|
+
export const BaseException: any;
|
26
|
+
export const FONT_IDENTITY_MATRIX: number[];
|
27
|
+
export const IDENTITY_MATRIX: number[];
|
28
|
+
export namespace OPS {
|
29
|
+
export const dependency: number;
|
30
|
+
export const setLineWidth: number;
|
31
|
+
export const setLineCap: number;
|
32
|
+
export const setLineJoin: number;
|
33
|
+
export const setMiterLimit: number;
|
34
|
+
export const setDash: number;
|
35
|
+
export const setRenderingIntent: number;
|
36
|
+
export const setFlatness: number;
|
37
|
+
export const setGState: number;
|
38
|
+
export const save: number;
|
39
|
+
export const restore: number;
|
40
|
+
export const transform: number;
|
41
|
+
export const moveTo: number;
|
42
|
+
export const lineTo: number;
|
43
|
+
export const curveTo: number;
|
44
|
+
export const curveTo2: number;
|
45
|
+
export const curveTo3: number;
|
46
|
+
export const closePath: number;
|
47
|
+
export const rectangle: number;
|
48
|
+
export const stroke: number;
|
49
|
+
export const closeStroke: number;
|
50
|
+
export const fill: number;
|
51
|
+
export const eoFill: number;
|
52
|
+
export const fillStroke: number;
|
53
|
+
export const eoFillStroke: number;
|
54
|
+
export const closeFillStroke: number;
|
55
|
+
export const closeEOFillStroke: number;
|
56
|
+
export const endPath: number;
|
57
|
+
export const clip: number;
|
58
|
+
export const eoClip: number;
|
59
|
+
export const beginText: number;
|
60
|
+
export const endText: number;
|
61
|
+
export const setCharSpacing: number;
|
62
|
+
export const setWordSpacing: number;
|
63
|
+
export const setHScale: number;
|
64
|
+
export const setLeading: number;
|
65
|
+
export const setFont: number;
|
66
|
+
export const setTextRenderingMode: number;
|
67
|
+
export const setTextRise: number;
|
68
|
+
export const moveText: number;
|
69
|
+
export const setLeadingMoveText: number;
|
70
|
+
export const setTextMatrix: number;
|
71
|
+
export const nextLine: number;
|
72
|
+
export const showText: number;
|
73
|
+
export const showSpacedText: number;
|
74
|
+
export const nextLineShowText: number;
|
75
|
+
export const nextLineSetSpacingShowText: number;
|
76
|
+
export const setCharWidth: number;
|
77
|
+
export const setCharWidthAndBounds: number;
|
78
|
+
export const setStrokeColorSpace: number;
|
79
|
+
export const setFillColorSpace: number;
|
80
|
+
export const setStrokeColor: number;
|
81
|
+
export const setStrokeColorN: number;
|
82
|
+
export const setFillColor: number;
|
83
|
+
export const setFillColorN: number;
|
84
|
+
export const setStrokeGray: number;
|
85
|
+
export const setFillGray: number;
|
86
|
+
export const setStrokeRGBColor: number;
|
87
|
+
export const setFillRGBColor: number;
|
88
|
+
export const setStrokeCMYKColor: number;
|
89
|
+
export const setFillCMYKColor: number;
|
90
|
+
export const shadingFill: number;
|
91
|
+
export const beginInlineImage: number;
|
92
|
+
export const beginImageData: number;
|
93
|
+
export const endInlineImage: number;
|
94
|
+
export const paintXObject: number;
|
95
|
+
export const markPoint: number;
|
96
|
+
export const markPointProps: number;
|
97
|
+
export const beginMarkedContent: number;
|
98
|
+
export const beginMarkedContentProps: number;
|
99
|
+
export const endMarkedContent: number;
|
100
|
+
export const beginCompat: number;
|
101
|
+
export const endCompat: number;
|
102
|
+
export const paintFormXObjectBegin: number;
|
103
|
+
export const paintFormXObjectEnd: number;
|
104
|
+
export const beginGroup: number;
|
105
|
+
export const endGroup: number;
|
106
|
+
export const beginAnnotations: number;
|
107
|
+
export const endAnnotations: number;
|
108
|
+
export const beginAnnotation: number;
|
109
|
+
export const endAnnotation: number;
|
110
|
+
export const paintJpegXObject: number;
|
111
|
+
export const paintImageMaskXObject: number;
|
112
|
+
export const paintImageMaskXObjectGroup: number;
|
113
|
+
export const paintImageXObject: number;
|
114
|
+
export const paintInlineImageXObject: number;
|
115
|
+
export const paintInlineImageXObjectGroup: number;
|
116
|
+
export const paintImageXObjectRepeat: number;
|
117
|
+
export const paintImageMaskXObjectRepeat: number;
|
118
|
+
export const paintSolidColorImageMask: number;
|
119
|
+
export const constructPath: number;
|
120
|
+
}
|
121
|
+
export namespace VerbosityLevel {
|
122
|
+
export const ERRORS: number;
|
123
|
+
export const WARNINGS: number;
|
124
|
+
export const INFOS: number;
|
125
|
+
}
|
126
|
+
export const UNSUPPORTED_FEATURES: {
|
127
|
+
/** @deprecated unused */
|
128
|
+
unknown: string;
|
129
|
+
forms: string;
|
130
|
+
javaScript: string;
|
131
|
+
smask: string;
|
132
|
+
shadingPattern: string;
|
133
|
+
/** @deprecated unused */
|
134
|
+
font: string;
|
135
|
+
errorTilingPattern: string;
|
136
|
+
errorExtGState: string;
|
137
|
+
errorXObject: string;
|
138
|
+
errorFontLoadType3: string;
|
139
|
+
errorFontState: string;
|
140
|
+
errorFontMissing: string;
|
141
|
+
errorFontTranslate: string;
|
142
|
+
errorColorSpace: string;
|
143
|
+
errorOperatorList: string;
|
144
|
+
errorFontToUnicode: string;
|
145
|
+
errorFontLoadNative: string;
|
146
|
+
errorFontGetPath: string;
|
147
|
+
errorMarkedContent: string;
|
148
|
+
};
|
149
|
+
export namespace AnnotationBorderStyleType {
|
150
|
+
export const SOLID: number;
|
151
|
+
export const DASHED: number;
|
152
|
+
export const BEVELED: number;
|
153
|
+
export const INSET: number;
|
154
|
+
export const UNDERLINE: number;
|
155
|
+
}
|
156
|
+
export namespace AnnotationFieldFlag {
|
157
|
+
export const READONLY: number;
|
158
|
+
export const REQUIRED: number;
|
159
|
+
export const NOEXPORT: number;
|
160
|
+
export const MULTILINE: number;
|
161
|
+
export const PASSWORD: number;
|
162
|
+
export const NOTOGGLETOOFF: number;
|
163
|
+
export const RADIO: number;
|
164
|
+
export const PUSHBUTTON: number;
|
165
|
+
export const COMBO: number;
|
166
|
+
export const EDIT: number;
|
167
|
+
export const SORT: number;
|
168
|
+
export const FILESELECT: number;
|
169
|
+
export const MULTISELECT: number;
|
170
|
+
export const DONOTSPELLCHECK: number;
|
171
|
+
export const DONOTSCROLL: number;
|
172
|
+
export const COMB: number;
|
173
|
+
export const RICHTEXT: number;
|
174
|
+
export const RADIOSINUNISON: number;
|
175
|
+
export const COMMITONSELCHANGE: number;
|
176
|
+
}
|
177
|
+
export namespace AnnotationFlag {
|
178
|
+
export const INVISIBLE: number;
|
179
|
+
export const HIDDEN: number;
|
180
|
+
export const PRINT: number;
|
181
|
+
export const NOZOOM: number;
|
182
|
+
export const NOROTATE: number;
|
183
|
+
export const NOVIEW: number;
|
184
|
+
const READONLY_1: number;
|
185
|
+
export { READONLY_1 as READONLY };
|
186
|
+
export const LOCKED: number;
|
187
|
+
export const TOGGLENOVIEW: number;
|
188
|
+
export const LOCKEDCONTENTS: number;
|
189
|
+
}
|
190
|
+
export namespace AnnotationMarkedState {
|
191
|
+
export const MARKED: string;
|
192
|
+
export const UNMARKED: string;
|
193
|
+
}
|
194
|
+
export namespace AnnotationReplyType {
|
195
|
+
export const GROUP: string;
|
196
|
+
export const REPLY: string;
|
197
|
+
}
|
198
|
+
export namespace AnnotationReviewState {
|
199
|
+
export const ACCEPTED: string;
|
200
|
+
export const REJECTED: string;
|
201
|
+
export const CANCELLED: string;
|
202
|
+
export const COMPLETED: string;
|
203
|
+
export const NONE: string;
|
204
|
+
}
|
205
|
+
export namespace AnnotationStateModelType {
|
206
|
+
const MARKED_1: string;
|
207
|
+
export { MARKED_1 as MARKED };
|
208
|
+
export const REVIEW: string;
|
209
|
+
}
|
210
|
+
export namespace AnnotationType {
|
211
|
+
export const TEXT: number;
|
212
|
+
export const LINK: number;
|
213
|
+
export const FREETEXT: number;
|
214
|
+
export const LINE: number;
|
215
|
+
export const SQUARE: number;
|
216
|
+
export const CIRCLE: number;
|
217
|
+
export const POLYGON: number;
|
218
|
+
export const POLYLINE: number;
|
219
|
+
export const HIGHLIGHT: number;
|
220
|
+
const UNDERLINE_1: number;
|
221
|
+
export { UNDERLINE_1 as UNDERLINE };
|
222
|
+
export const SQUIGGLY: number;
|
223
|
+
export const STRIKEOUT: number;
|
224
|
+
export const STAMP: number;
|
225
|
+
export const CARET: number;
|
226
|
+
export const INK: number;
|
227
|
+
export const POPUP: number;
|
228
|
+
export const FILEATTACHMENT: number;
|
229
|
+
export const SOUND: number;
|
230
|
+
export const MOVIE: number;
|
231
|
+
export const WIDGET: number;
|
232
|
+
export const SCREEN: number;
|
233
|
+
export const PRINTERMARK: number;
|
234
|
+
export const TRAPNET: number;
|
235
|
+
export const WATERMARK: number;
|
236
|
+
export const THREED: number;
|
237
|
+
export const REDACT: number;
|
238
|
+
}
|
239
|
+
export namespace FontType {
|
240
|
+
export const UNKNOWN: string;
|
241
|
+
export const TYPE1: string;
|
242
|
+
export const TYPE1C: string;
|
243
|
+
export const CIDFONTTYPE0: string;
|
244
|
+
export const CIDFONTTYPE0C: string;
|
245
|
+
export const TRUETYPE: string;
|
246
|
+
export const CIDFONTTYPE2: string;
|
247
|
+
export const TYPE3: string;
|
248
|
+
export const OPENTYPE: string;
|
249
|
+
export const TYPE0: string;
|
250
|
+
export const MMTYPE1: string;
|
251
|
+
}
|
252
|
+
export namespace ImageKind {
|
253
|
+
export const GRAYSCALE_1BPP: number;
|
254
|
+
export const RGB_24BPP: number;
|
255
|
+
export const RGBA_32BPP: number;
|
256
|
+
}
|
257
|
+
export namespace CMapCompressionType {
|
258
|
+
const NONE_1: number;
|
259
|
+
export { NONE_1 as NONE };
|
260
|
+
export const BINARY: number;
|
261
|
+
export const STREAM: number;
|
262
|
+
}
|
263
|
+
declare const AbortException_base: any;
|
264
|
+
/**
|
265
|
+
* Error used to indicate task cancellation.
|
266
|
+
*/
|
267
|
+
export class AbortException extends AbortException_base {
|
268
|
+
[x: string]: any;
|
269
|
+
}
|
270
|
+
declare const InvalidPDFException_base: any;
|
271
|
+
export class InvalidPDFException extends InvalidPDFException_base {
|
272
|
+
[x: string]: any;
|
273
|
+
}
|
274
|
+
declare const MissingPDFException_base: any;
|
275
|
+
export class MissingPDFException extends MissingPDFException_base {
|
276
|
+
[x: string]: any;
|
277
|
+
}
|
278
|
+
declare const PasswordException_base: any;
|
279
|
+
export class PasswordException extends PasswordException_base {
|
280
|
+
[x: string]: any;
|
281
|
+
constructor(msg: any, code: any);
|
282
|
+
code: any;
|
283
|
+
}
|
284
|
+
export namespace PasswordResponses {
|
285
|
+
export const NEED_PASSWORD: number;
|
286
|
+
export const INCORRECT_PASSWORD: number;
|
287
|
+
}
|
288
|
+
export namespace PermissionFlag {
|
289
|
+
const PRINT_1: number;
|
290
|
+
export { PRINT_1 as PRINT };
|
291
|
+
export const MODIFY_CONTENTS: number;
|
292
|
+
export const COPY: number;
|
293
|
+
export const MODIFY_ANNOTATIONS: number;
|
294
|
+
export const FILL_INTERACTIVE_FORMS: number;
|
295
|
+
export const COPY_FOR_ACCESSIBILITY: number;
|
296
|
+
export const ASSEMBLE: number;
|
297
|
+
export const PRINT_HIGH_QUALITY: number;
|
298
|
+
}
|
299
|
+
export namespace StreamType {
|
300
|
+
const UNKNOWN_1: string;
|
301
|
+
export { UNKNOWN_1 as UNKNOWN };
|
302
|
+
export const FLATE: string;
|
303
|
+
export const LZW: string;
|
304
|
+
export const DCT: string;
|
305
|
+
export const JPX: string;
|
306
|
+
export const JBIG: string;
|
307
|
+
export const A85: string;
|
308
|
+
export const AHX: string;
|
309
|
+
export const CCF: string;
|
310
|
+
export const RLX: string;
|
311
|
+
}
|
312
|
+
export namespace TextRenderingMode {
|
313
|
+
export const FILL: number;
|
314
|
+
export const STROKE: number;
|
315
|
+
export const FILL_STROKE: number;
|
316
|
+
const INVISIBLE_1: number;
|
317
|
+
export { INVISIBLE_1 as INVISIBLE };
|
318
|
+
export const FILL_ADD_TO_PATH: number;
|
319
|
+
export const STROKE_ADD_TO_PATH: number;
|
320
|
+
export const FILL_STROKE_ADD_TO_PATH: number;
|
321
|
+
export const ADD_TO_PATH: number;
|
322
|
+
export const FILL_STROKE_MASK: number;
|
323
|
+
export const ADD_TO_PATH_FLAG: number;
|
324
|
+
}
|
325
|
+
declare const UnexpectedResponseException_base: any;
|
326
|
+
export class UnexpectedResponseException extends UnexpectedResponseException_base {
|
327
|
+
[x: string]: any;
|
328
|
+
constructor(msg: any, status: any);
|
329
|
+
status: any;
|
330
|
+
}
|
331
|
+
declare const UnknownErrorException_base: any;
|
332
|
+
export class UnknownErrorException extends UnknownErrorException_base {
|
333
|
+
[x: string]: any;
|
334
|
+
constructor(msg: any, details: any);
|
335
|
+
details: any;
|
336
|
+
}
|
337
|
+
export class Util {
|
338
|
+
static makeCssRgb(r: any, g: any, b: any): string;
|
339
|
+
static transform(m1: any, m2: any): any[];
|
340
|
+
static applyTransform(p: any, m: any): any[];
|
341
|
+
static applyInverseTransform(p: any, m: any): number[];
|
342
|
+
static getAxialAlignedBoundingBox(r: any, m: any): number[];
|
343
|
+
static inverseTransform(m: any): number[];
|
344
|
+
static apply3dTransform(m: any, v: any): number[];
|
345
|
+
static singularValueDecompose2dScale(m: any): number[];
|
346
|
+
static normalizeRect(rect: any): any;
|
347
|
+
static intersect(rect1: any, rect2: any): any[] | null;
|
348
|
+
}
|
349
|
+
declare const FormatError_base: any;
|
350
|
+
/**
|
351
|
+
* Error caused during parsing PDF data.
|
352
|
+
*/
|
353
|
+
export class FormatError extends FormatError_base {
|
354
|
+
[x: string]: any;
|
355
|
+
}
|
356
|
+
/**
|
357
|
+
* Gets length of the array (Array, Uint8Array, or string) in bytes.
|
358
|
+
* @param {Array<any>|Uint8Array|string} arr
|
359
|
+
* @returns {number}
|
360
|
+
*/
|
361
|
+
export function arrayByteLength(arr: Array<any> | Uint8Array | string): number;
|
362
|
+
/**
|
363
|
+
* Combines array items (arrays) into single Uint8Array object.
|
364
|
+
* @param {Array<Array<any>|Uint8Array|string>} arr - the array of the arrays
|
365
|
+
* (Array, Uint8Array, or string).
|
366
|
+
* @returns {Uint8Array}
|
367
|
+
*/
|
368
|
+
export function arraysToBytes(arr: Array<Array<any> | Uint8Array | string>): Uint8Array;
|
369
|
+
export function assert(cond: any, msg: any): void;
|
370
|
+
export function bytesToString(bytes: any): string;
|
371
|
+
/**
|
372
|
+
* Promise Capability object.
|
373
|
+
*
|
374
|
+
* @typedef {Object} PromiseCapability
|
375
|
+
* @property {Promise<any>} promise - A Promise object.
|
376
|
+
* @property {boolean} settled - If the Promise has been fulfilled/rejected.
|
377
|
+
* @property {function} resolve - Fulfills the Promise.
|
378
|
+
* @property {function} reject - Rejects the Promise.
|
379
|
+
*/
|
380
|
+
/**
|
381
|
+
* Creates a promise capability object.
|
382
|
+
* @alias createPromiseCapability
|
383
|
+
*
|
384
|
+
* @returns {PromiseCapability}
|
385
|
+
*/
|
386
|
+
export function createPromiseCapability(): PromiseCapability;
|
387
|
+
export function createObjectURL(data: any, contentType: any, forceDataSchema?: boolean): string;
|
388
|
+
export function escapeString(str: any): any;
|
389
|
+
export function getModificationDate(date?: Date): string;
|
390
|
+
export function getVerbosityLevel(): number;
|
391
|
+
export function info(msg: any): void;
|
392
|
+
export function isArrayBuffer(v: any): boolean;
|
393
|
+
export function isArrayEqual(arr1: any, arr2: any): any;
|
394
|
+
export function isBool(v: any): boolean;
|
395
|
+
export function isNum(v: any): boolean;
|
396
|
+
export function isString(v: any): boolean;
|
397
|
+
export function isSameOrigin(baseUrl: any, otherUrl: any): boolean;
|
398
|
+
/**
|
399
|
+
* Attempts to create a valid absolute URL.
|
400
|
+
*
|
401
|
+
* @param {URL|string} url - An absolute, or relative, URL.
|
402
|
+
* @param {URL|string} baseUrl - An absolute URL.
|
403
|
+
* @returns Either a valid {URL}, or `null` otherwise.
|
404
|
+
*/
|
405
|
+
export function createValidAbsoluteUrl(url: URL | string, baseUrl: URL | string): URL | null;
|
406
|
+
export namespace IsLittleEndianCached { }
|
407
|
+
export namespace IsEvalSupportedCached { }
|
408
|
+
/**
|
409
|
+
* @param {string} str
|
410
|
+
*/
|
411
|
+
export function removeNullCharacters(str: string): string;
|
412
|
+
export function setVerbosityLevel(level: any): void;
|
413
|
+
export function shadow(obj: any, prop: any, value: any): any;
|
414
|
+
export function string32(value: any): string;
|
415
|
+
export function stringToBytes(str: any): Uint8Array;
|
416
|
+
export function stringToPDFString(str: any): string;
|
417
|
+
export function stringToUTF8String(str: any): string;
|
418
|
+
export function utf8StringToString(str: any): string;
|
419
|
+
export function warn(msg: any): void;
|
420
|
+
export function unreachable(msg: any): void;
|
421
|
+
export {};
|
package/web/images/shadow.png
CHANGED
Binary file
|