@divriots/pdfjs-dist 3.10.111-divriots2.0
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.
- package/CODE_OF_CONDUCT.md +15 -0
- package/LICENSE +177 -0
- package/README.md +14 -0
- package/build/pdf.js +18009 -0
- package/build/pdf.js.map +1 -0
- package/build/pdf.min.js +22 -0
- package/build/pdf.sandbox.js +280 -0
- package/build/pdf.sandbox.js.map +1 -0
- package/build/pdf.sandbox.min.js +22 -0
- package/build/pdf.worker.entry.js +19 -0
- package/build/pdf.worker.js +57863 -0
- package/build/pdf.worker.js.map +1 -0
- package/build/pdf.worker.min.js +22 -0
- package/cmaps/78-EUC-H.bcmap +0 -0
- package/cmaps/78-EUC-V.bcmap +0 -0
- package/cmaps/78-H.bcmap +0 -0
- package/cmaps/78-RKSJ-H.bcmap +0 -0
- package/cmaps/78-RKSJ-V.bcmap +0 -0
- package/cmaps/78-V.bcmap +0 -0
- package/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-V.bcmap +0 -0
- package/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/cmaps/B5-H.bcmap +0 -0
- package/cmaps/B5-V.bcmap +0 -0
- package/cmaps/B5pc-H.bcmap +0 -0
- package/cmaps/B5pc-V.bcmap +0 -0
- package/cmaps/CNS-EUC-H.bcmap +0 -0
- package/cmaps/CNS-EUC-V.bcmap +0 -0
- package/cmaps/CNS1-H.bcmap +0 -0
- package/cmaps/CNS1-V.bcmap +0 -0
- package/cmaps/CNS2-H.bcmap +0 -0
- package/cmaps/CNS2-V.bcmap +3 -0
- package/cmaps/ETHK-B5-H.bcmap +0 -0
- package/cmaps/ETHK-B5-V.bcmap +0 -0
- package/cmaps/ETen-B5-H.bcmap +0 -0
- package/cmaps/ETen-B5-V.bcmap +0 -0
- package/cmaps/ETenms-B5-H.bcmap +3 -0
- package/cmaps/ETenms-B5-V.bcmap +0 -0
- package/cmaps/EUC-H.bcmap +0 -0
- package/cmaps/EUC-V.bcmap +0 -0
- package/cmaps/Ext-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/cmaps/Ext-V.bcmap +0 -0
- package/cmaps/GB-EUC-H.bcmap +0 -0
- package/cmaps/GB-EUC-V.bcmap +0 -0
- package/cmaps/GB-H.bcmap +4 -0
- package/cmaps/GB-V.bcmap +0 -0
- package/cmaps/GBK-EUC-H.bcmap +0 -0
- package/cmaps/GBK-EUC-V.bcmap +0 -0
- package/cmaps/GBK2K-H.bcmap +0 -0
- package/cmaps/GBK2K-V.bcmap +0 -0
- package/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/cmaps/GBT-EUC-H.bcmap +0 -0
- package/cmaps/GBT-EUC-V.bcmap +0 -0
- package/cmaps/GBT-H.bcmap +0 -0
- package/cmaps/GBT-V.bcmap +0 -0
- package/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/cmaps/H.bcmap +0 -0
- package/cmaps/HKdla-B5-H.bcmap +0 -0
- package/cmaps/HKdla-B5-V.bcmap +0 -0
- package/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/cmaps/HKm314-B5-H.bcmap +0 -0
- package/cmaps/HKm314-B5-V.bcmap +0 -0
- package/cmaps/HKm471-B5-H.bcmap +0 -0
- package/cmaps/HKm471-B5-V.bcmap +0 -0
- package/cmaps/HKscs-B5-H.bcmap +0 -0
- package/cmaps/HKscs-B5-V.bcmap +0 -0
- package/cmaps/Hankaku.bcmap +0 -0
- package/cmaps/Hiragana.bcmap +0 -0
- package/cmaps/KSC-EUC-H.bcmap +0 -0
- package/cmaps/KSC-EUC-V.bcmap +0 -0
- package/cmaps/KSC-H.bcmap +0 -0
- package/cmaps/KSC-Johab-H.bcmap +0 -0
- package/cmaps/KSC-Johab-V.bcmap +0 -0
- package/cmaps/KSC-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/cmaps/Katakana.bcmap +0 -0
- package/cmaps/LICENSE +36 -0
- package/cmaps/NWP-H.bcmap +0 -0
- package/cmaps/NWP-V.bcmap +0 -0
- package/cmaps/RKSJ-H.bcmap +0 -0
- package/cmaps/RKSJ-V.bcmap +0 -0
- package/cmaps/Roman.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/cmaps/V.bcmap +0 -0
- package/cmaps/WP-Symbol.bcmap +0 -0
- package/image_decoders/pdf.image_decoders.js +7490 -0
- package/image_decoders/pdf.image_decoders.js.map +1 -0
- package/image_decoders/pdf.image_decoders.min.js +22 -0
- package/legacy/build/pdf.d.ts +1 -0
- package/legacy/build/pdf.js +22941 -0
- package/legacy/build/pdf.js.map +1 -0
- package/legacy/build/pdf.min.js +22 -0
- package/legacy/build/pdf.sandbox.js +3274 -0
- package/legacy/build/pdf.sandbox.js.map +1 -0
- package/legacy/build/pdf.sandbox.min.js +22 -0
- package/legacy/build/pdf.worker.entry.js +19 -0
- package/legacy/build/pdf.worker.js +62058 -0
- package/legacy/build/pdf.worker.js.map +1 -0
- package/legacy/build/pdf.worker.min.js +22 -0
- package/legacy/image_decoders/pdf.image_decoders.js +10615 -0
- package/legacy/image_decoders/pdf.image_decoders.js.map +1 -0
- package/legacy/image_decoders/pdf.image_decoders.min.js +22 -0
- package/legacy/web/images/annotation-check.svg +11 -0
- package/legacy/web/images/annotation-comment.svg +16 -0
- package/legacy/web/images/annotation-help.svg +26 -0
- package/legacy/web/images/annotation-insert.svg +10 -0
- package/legacy/web/images/annotation-key.svg +11 -0
- package/legacy/web/images/annotation-newparagraph.svg +11 -0
- package/legacy/web/images/annotation-noicon.svg +7 -0
- package/legacy/web/images/annotation-note.svg +42 -0
- package/legacy/web/images/annotation-paperclip.svg +6 -0
- package/legacy/web/images/annotation-paragraph.svg +16 -0
- package/legacy/web/images/annotation-pushpin.svg +7 -0
- package/legacy/web/images/loading-icon.gif +0 -0
- package/legacy/web/pdf_viewer.css +1375 -0
- package/legacy/web/pdf_viewer.d.ts +1 -0
- package/legacy/web/pdf_viewer.js +10502 -0
- package/legacy/web/pdf_viewer.js.map +1 -0
- package/package.json +35 -0
- package/standard_fonts/FoxitDingbats.pfb +0 -0
- package/standard_fonts/FoxitFixed.pfb +0 -0
- package/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/standard_fonts/FoxitSerif.pfb +0 -0
- package/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/standard_fonts/FoxitSymbol.pfb +0 -0
- package/standard_fonts/LICENSE_FOXIT +27 -0
- package/standard_fonts/LICENSE_LIBERATION +102 -0
- package/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/types/external/webL10n/l10n.d.ts +0 -0
- package/types/src/display/annotation_layer.d.ts +203 -0
- package/types/src/display/annotation_storage.d.ts +89 -0
- package/types/src/display/api.d.ts +1592 -0
- package/types/src/display/base_factory.d.ts +54 -0
- package/types/src/display/canvas.d.ts +208 -0
- package/types/src/display/display_utils.d.ts +277 -0
- package/types/src/display/editor/annotation_editor_layer.d.ts +196 -0
- package/types/src/display/editor/editor.d.ts +325 -0
- package/types/src/display/editor/freetext.d.ts +72 -0
- package/types/src/display/editor/ink.d.ts +95 -0
- package/types/src/display/editor/stamp.d.ts +28 -0
- package/types/src/display/editor/tools.d.ts +349 -0
- package/types/src/display/font_loader.d.ts +43 -0
- package/types/src/display/metadata.d.ts +11 -0
- package/types/src/display/optional_content_config.d.ts +13 -0
- package/types/src/display/pattern_helper.d.ts +73 -0
- package/types/src/display/text_layer.d.ts +151 -0
- package/types/src/display/transport_stream.d.ts +68 -0
- package/types/src/display/worker_options.d.ts +27 -0
- package/types/src/display/xfa_layer.d.ts +46 -0
- package/types/src/display/xfa_text.d.ts +19 -0
- package/types/src/pdf.d.ts +62 -0
- package/types/src/shared/image_utils.d.ts +17 -0
- package/types/src/shared/message_handler.d.ts +43 -0
- package/types/src/shared/murmurhash3.d.ts +7 -0
- package/types/src/shared/scripting_utils.d.ts +16 -0
- package/types/src/shared/util.d.ts +398 -0
- package/types/web/annotation_editor_layer_builder.d.ts +50 -0
- package/types/web/annotation_layer_builder.d.ts +83 -0
- package/types/web/app_options.d.ts +14 -0
- package/types/web/download_manager.d.ts +14 -0
- package/types/web/event_utils.d.ts +75 -0
- package/types/web/generic_scripting.d.ts +8 -0
- package/types/web/genericl10n.d.ts +13 -0
- package/types/web/interfaces.d.ts +163 -0
- package/types/web/l10n_utils.d.ts +7 -0
- package/types/web/pdf_find_controller.d.ts +108 -0
- package/types/web/pdf_find_utils.d.ts +16 -0
- package/types/web/pdf_history.d.ts +168 -0
- package/types/web/pdf_link_service.d.ts +243 -0
- package/types/web/pdf_page_view.d.ts +209 -0
- package/types/web/pdf_rendering_queue.d.ts +53 -0
- package/types/web/pdf_scripting_manager.component.d.ts +5 -0
- package/types/web/pdf_scripting_manager.d.ts +61 -0
- package/types/web/pdf_single_page_viewer.d.ts +7 -0
- package/types/web/pdf_thumbnail_view.d.ts +131 -0
- package/types/web/pdf_thumbnail_viewer.d.ts +104 -0
- package/types/web/pdf_viewer.component.d.ts +24 -0
- package/types/web/pdf_viewer.d.ts +455 -0
- package/types/web/struct_tree_layer_builder.d.ts +7 -0
- package/types/web/text_accessibility.d.ts +42 -0
- package/types/web/text_highlighter.d.ts +63 -0
- package/types/web/text_layer_builder.d.ts +64 -0
- package/types/web/ui_utils.d.ts +288 -0
- package/types/web/xfa_layer_builder.d.ts +41 -0
- package/web/images/annotation-check.svg +11 -0
- package/web/images/annotation-comment.svg +16 -0
- package/web/images/annotation-help.svg +26 -0
- package/web/images/annotation-insert.svg +10 -0
- package/web/images/annotation-key.svg +11 -0
- package/web/images/annotation-newparagraph.svg +11 -0
- package/web/images/annotation-noicon.svg +7 -0
- package/web/images/annotation-note.svg +42 -0
- package/web/images/annotation-paperclip.svg +6 -0
- package/web/images/annotation-paragraph.svg +16 -0
- package/web/images/annotation-pushpin.svg +7 -0
- package/web/images/loading-icon.gif +0 -0
- package/web/pdf_viewer.css +1375 -0
- package/web/pdf_viewer.d.ts +1 -0
- package/web/pdf_viewer.js +7752 -0
- package/web/pdf_viewer.js.map +1 -0
- package/webpack.js +26 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
|
|
2
|
+
export type PageViewport = import("../src/display/display_utils").PageViewport;
|
|
3
|
+
export type RenderingStates = any;
|
|
4
|
+
/**
|
|
5
|
+
* @interface
|
|
6
|
+
*/
|
|
7
|
+
export class IDownloadManager {
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} url
|
|
10
|
+
* @param {string} filename
|
|
11
|
+
* @param {Object} [options]
|
|
12
|
+
*/
|
|
13
|
+
downloadUrl(url: string, filename: string, options?: Object | undefined): void;
|
|
14
|
+
/**
|
|
15
|
+
* @param {Uint8Array} data
|
|
16
|
+
* @param {string} filename
|
|
17
|
+
* @param {string} [contentType]
|
|
18
|
+
*/
|
|
19
|
+
downloadData(data: Uint8Array, filename: string, contentType?: string | undefined): void;
|
|
20
|
+
/**
|
|
21
|
+
* @param {HTMLElement} element
|
|
22
|
+
* @param {Uint8Array} data
|
|
23
|
+
* @param {string} filename
|
|
24
|
+
* @returns {boolean} Indicating if the data was opened.
|
|
25
|
+
*/
|
|
26
|
+
openOrDownloadData(element: HTMLElement, data: Uint8Array, filename: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @param {Blob} blob
|
|
29
|
+
* @param {string} url
|
|
30
|
+
* @param {string} filename
|
|
31
|
+
* @param {Object} [options]
|
|
32
|
+
*/
|
|
33
|
+
download(blob: Blob, url: string, filename: string, options?: Object | undefined): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @interface
|
|
37
|
+
*/
|
|
38
|
+
export class IL10n {
|
|
39
|
+
/**
|
|
40
|
+
* @returns {Promise<string>} - Resolves to the current locale.
|
|
41
|
+
*/
|
|
42
|
+
getLanguage(): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* @returns {Promise<string>} - Resolves to 'rtl' or 'ltr'.
|
|
45
|
+
*/
|
|
46
|
+
getDirection(): Promise<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Translates text identified by the key and adds/formats data using the args
|
|
49
|
+
* property bag. If the key was not found, translation falls back to the
|
|
50
|
+
* fallback text.
|
|
51
|
+
* @param {string} key
|
|
52
|
+
* @param {Object | null} [args]
|
|
53
|
+
* @param {string} [fallback]
|
|
54
|
+
* @returns {Promise<string>}
|
|
55
|
+
*/
|
|
56
|
+
get(key: string, args?: Object | null | undefined, fallback?: string | undefined): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Translates HTML element.
|
|
59
|
+
* @param {HTMLElement} element
|
|
60
|
+
* @returns {Promise<void>}
|
|
61
|
+
*/
|
|
62
|
+
translate(element: HTMLElement): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
/** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
|
|
65
|
+
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
|
|
66
|
+
/** @typedef {import("./ui_utils").RenderingStates} RenderingStates */
|
|
67
|
+
/**
|
|
68
|
+
* @interface
|
|
69
|
+
*/
|
|
70
|
+
export class IPDFLinkService {
|
|
71
|
+
/**
|
|
72
|
+
* @type {number}
|
|
73
|
+
*/
|
|
74
|
+
get pagesCount(): number;
|
|
75
|
+
/**
|
|
76
|
+
* @param {number} value
|
|
77
|
+
*/
|
|
78
|
+
set page(arg: number);
|
|
79
|
+
/**
|
|
80
|
+
* @type {number}
|
|
81
|
+
*/
|
|
82
|
+
get page(): number;
|
|
83
|
+
/**
|
|
84
|
+
* @param {number} value
|
|
85
|
+
*/
|
|
86
|
+
set rotation(arg: number);
|
|
87
|
+
/**
|
|
88
|
+
* @type {number}
|
|
89
|
+
*/
|
|
90
|
+
get rotation(): number;
|
|
91
|
+
/**
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
*/
|
|
94
|
+
get isInPresentationMode(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* @param {boolean} value
|
|
97
|
+
*/
|
|
98
|
+
set externalLinkEnabled(arg: boolean);
|
|
99
|
+
/**
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
*/
|
|
102
|
+
get externalLinkEnabled(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* @param {string|Array} dest - The named, or explicit, PDF destination.
|
|
105
|
+
*/
|
|
106
|
+
goToDestination(dest: string | any[]): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* @param {number|string} val - The page number, or page label.
|
|
109
|
+
*/
|
|
110
|
+
goToPage(val: number | string): void;
|
|
111
|
+
/**
|
|
112
|
+
* @param {HTMLAnchorElement} link
|
|
113
|
+
* @param {string} url
|
|
114
|
+
* @param {boolean} [newWindow]
|
|
115
|
+
*/
|
|
116
|
+
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
|
|
117
|
+
/**
|
|
118
|
+
* @param dest - The PDF destination object.
|
|
119
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
120
|
+
*/
|
|
121
|
+
getDestinationHash(dest: any): string;
|
|
122
|
+
/**
|
|
123
|
+
* @param hash - The PDF parameters/hash.
|
|
124
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
125
|
+
*/
|
|
126
|
+
getAnchorUrl(hash: any): string;
|
|
127
|
+
/**
|
|
128
|
+
* @param {string} hash
|
|
129
|
+
*/
|
|
130
|
+
setHash(hash: string): void;
|
|
131
|
+
/**
|
|
132
|
+
* @param {string} action
|
|
133
|
+
*/
|
|
134
|
+
executeNamedAction(action: string): void;
|
|
135
|
+
/**
|
|
136
|
+
* @param {Object} action
|
|
137
|
+
*/
|
|
138
|
+
executeSetOCGState(action: Object): void;
|
|
139
|
+
/**
|
|
140
|
+
* @param {number} pageNum - page number.
|
|
141
|
+
* @param {Object} pageRef - reference to the page.
|
|
142
|
+
*/
|
|
143
|
+
cachePageRef(pageNum: number, pageRef: Object): void;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @interface
|
|
147
|
+
*/
|
|
148
|
+
export class IRenderableView {
|
|
149
|
+
/** @type {function | null} */
|
|
150
|
+
resume: Function | null;
|
|
151
|
+
/**
|
|
152
|
+
* @type {string} - Unique ID for rendering queue.
|
|
153
|
+
*/
|
|
154
|
+
get renderingId(): string;
|
|
155
|
+
/**
|
|
156
|
+
* @type {RenderingStates}
|
|
157
|
+
*/
|
|
158
|
+
get renderingState(): any;
|
|
159
|
+
/**
|
|
160
|
+
* @returns {Promise} Resolved on draw completion.
|
|
161
|
+
*/
|
|
162
|
+
draw(): Promise<any>;
|
|
163
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function getL10nFallback(key: any, args: any): any;
|
|
2
|
+
export namespace NullL10n {
|
|
3
|
+
function getLanguage(): Promise<string>;
|
|
4
|
+
function getDirection(): Promise<string>;
|
|
5
|
+
function get(key: any, args?: null, fallback?: any): Promise<any>;
|
|
6
|
+
function translate(element: any): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
|
|
2
|
+
export type EventBus = import("./event_utils").EventBus;
|
|
3
|
+
export type IPDFLinkService = import("./interfaces").IPDFLinkService;
|
|
4
|
+
export type PDFFindControllerOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* - The navigation/linking service.
|
|
7
|
+
*/
|
|
8
|
+
linkService: IPDFLinkService;
|
|
9
|
+
/**
|
|
10
|
+
* - The application event bus.
|
|
11
|
+
*/
|
|
12
|
+
eventBus: EventBus;
|
|
13
|
+
/**
|
|
14
|
+
* - True if the matches
|
|
15
|
+
* count must be updated on progress or only when the last page is reached.
|
|
16
|
+
* The default value is `true`.
|
|
17
|
+
*/
|
|
18
|
+
updateMatchesCountOnProgress?: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
export namespace FindState {
|
|
21
|
+
let FOUND: number;
|
|
22
|
+
let NOT_FOUND: number;
|
|
23
|
+
let WRAPPED: number;
|
|
24
|
+
let PENDING: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {Object} PDFFindControllerOptions
|
|
28
|
+
* @property {IPDFLinkService} linkService - The navigation/linking service.
|
|
29
|
+
* @property {EventBus} eventBus - The application event bus.
|
|
30
|
+
* @property {boolean} [updateMatchesCountOnProgress] - True if the matches
|
|
31
|
+
* count must be updated on progress or only when the last page is reached.
|
|
32
|
+
* The default value is `true`.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Provides search functionality to find a given string in a PDF document.
|
|
36
|
+
*/
|
|
37
|
+
export class PDFFindController {
|
|
38
|
+
/**
|
|
39
|
+
* @param {PDFFindControllerOptions} options
|
|
40
|
+
*/
|
|
41
|
+
constructor({ linkService, eventBus, updateMatchesCountOnProgress }: PDFFindControllerOptions);
|
|
42
|
+
_linkService: import("./interfaces").IPDFLinkService;
|
|
43
|
+
_eventBus: import("./event_utils").EventBus;
|
|
44
|
+
/**
|
|
45
|
+
* Callback used to check if a `pageNumber` is currently visible.
|
|
46
|
+
* @type {function}
|
|
47
|
+
*/
|
|
48
|
+
onIsPageVisible: Function;
|
|
49
|
+
get highlightMatches(): boolean | undefined;
|
|
50
|
+
get pageMatches(): any[] | undefined;
|
|
51
|
+
get pageMatchesLength(): any[] | undefined;
|
|
52
|
+
get selected(): {
|
|
53
|
+
pageIdx: number;
|
|
54
|
+
matchIdx: number;
|
|
55
|
+
} | undefined;
|
|
56
|
+
get state(): null;
|
|
57
|
+
/**
|
|
58
|
+
* Set a reference to the PDF document in order to search it.
|
|
59
|
+
* Note that searching is not possible if this method is not called.
|
|
60
|
+
*
|
|
61
|
+
* @param {PDFDocumentProxy} pdfDocument - The PDF document to search.
|
|
62
|
+
*/
|
|
63
|
+
setDocument(pdfDocument: PDFDocumentProxy): void;
|
|
64
|
+
_pdfDocument: import("../src/display/api").PDFDocumentProxy | null | undefined;
|
|
65
|
+
_dirtyMatch: boolean | undefined;
|
|
66
|
+
_findTimeout: any;
|
|
67
|
+
_highlightMatches: boolean | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* @typedef {Object} PDFFindControllerScrollMatchIntoViewParams
|
|
70
|
+
* @property {HTMLElement} element
|
|
71
|
+
* @property {number} selectedLeft
|
|
72
|
+
* @property {number} pageIndex
|
|
73
|
+
* @property {number} matchIndex
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Scroll the current match into view.
|
|
77
|
+
* @param {PDFFindControllerScrollMatchIntoViewParams}
|
|
78
|
+
*/
|
|
79
|
+
scrollMatchIntoView({ element, selectedLeft, pageIndex, matchIndex, }: {
|
|
80
|
+
element: HTMLElement;
|
|
81
|
+
selectedLeft: number;
|
|
82
|
+
pageIndex: number;
|
|
83
|
+
matchIndex: number;
|
|
84
|
+
}): void;
|
|
85
|
+
_scrollMatches: boolean | undefined;
|
|
86
|
+
_pageMatches: any[] | undefined;
|
|
87
|
+
_pageMatchesLength: any[] | undefined;
|
|
88
|
+
_selected: {
|
|
89
|
+
pageIdx: number;
|
|
90
|
+
matchIdx: number;
|
|
91
|
+
} | undefined;
|
|
92
|
+
_offset: {
|
|
93
|
+
pageIdx: null;
|
|
94
|
+
matchIdx: null;
|
|
95
|
+
wrapped: boolean;
|
|
96
|
+
} | undefined;
|
|
97
|
+
_extractTextPromises: any[] | undefined;
|
|
98
|
+
_pageContents: any[] | undefined;
|
|
99
|
+
_pageDiffs: any[] | undefined;
|
|
100
|
+
_hasDiacritics: any[] | undefined;
|
|
101
|
+
_matchesCountTotal: number | undefined;
|
|
102
|
+
_pagesToSearch: number | null | undefined;
|
|
103
|
+
_pendingFindMatches: Set<any> | undefined;
|
|
104
|
+
_resumePageIdx: any;
|
|
105
|
+
_firstPageCapability: any;
|
|
106
|
+
_rawQuery: any;
|
|
107
|
+
#private;
|
|
108
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export namespace CharacterType {
|
|
2
|
+
let SPACE: number;
|
|
3
|
+
let ALPHA_LETTER: number;
|
|
4
|
+
let PUNCT: number;
|
|
5
|
+
let HAN_LETTER: number;
|
|
6
|
+
let KATAKANA_LETTER: number;
|
|
7
|
+
let HIRAGANA_LETTER: number;
|
|
8
|
+
let HALFWIDTH_KATAKANA_LETTER: number;
|
|
9
|
+
let THAI_LETTER: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* This function is based on the word-break detection implemented in:
|
|
13
|
+
* https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp
|
|
14
|
+
*/
|
|
15
|
+
export function getCharacterType(charCode: any): number;
|
|
16
|
+
export function getNormalizeWithNFKC(): any;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export type PDFHistoryOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* - The navigation/linking service.
|
|
4
|
+
*/
|
|
5
|
+
linkService: IPDFLinkService;
|
|
6
|
+
/**
|
|
7
|
+
* - The application event bus.
|
|
8
|
+
*/
|
|
9
|
+
eventBus: EventBus;
|
|
10
|
+
};
|
|
11
|
+
export type InitializeParameters = {
|
|
12
|
+
/**
|
|
13
|
+
* - The PDF document's unique fingerprint.
|
|
14
|
+
*/
|
|
15
|
+
fingerprint: string;
|
|
16
|
+
/**
|
|
17
|
+
* - Reset the browsing history.
|
|
18
|
+
*/
|
|
19
|
+
resetHistory?: boolean | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* - Attempt to update the document URL, with
|
|
22
|
+
* the current hash, when pushing/replacing browser history entries.
|
|
23
|
+
*/
|
|
24
|
+
updateUrl?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type PushParameters = {
|
|
27
|
+
/**
|
|
28
|
+
* - The named destination. If absent, a
|
|
29
|
+
* stringified version of `explicitDest` is used.
|
|
30
|
+
*/
|
|
31
|
+
namedDest?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* - The explicit destination array.
|
|
34
|
+
*/
|
|
35
|
+
explicitDest: any[];
|
|
36
|
+
/**
|
|
37
|
+
* - The page to which the destination points.
|
|
38
|
+
*/
|
|
39
|
+
pageNumber: number;
|
|
40
|
+
};
|
|
41
|
+
export type EventBus = import("./event_utils").EventBus;
|
|
42
|
+
export type IPDFLinkService = import("./interfaces").IPDFLinkService;
|
|
43
|
+
export function isDestArraysEqual(firstDest: any, secondDest: any): boolean;
|
|
44
|
+
export function isDestHashesEqual(destHash: any, pushHash: any): boolean;
|
|
45
|
+
export class PDFHistory {
|
|
46
|
+
/**
|
|
47
|
+
* @param {PDFHistoryOptions} options
|
|
48
|
+
*/
|
|
49
|
+
constructor({ linkService, eventBus }: PDFHistoryOptions);
|
|
50
|
+
linkService: import("./interfaces").IPDFLinkService;
|
|
51
|
+
eventBus: import("./event_utils.js").EventBus;
|
|
52
|
+
_initialized: boolean;
|
|
53
|
+
_fingerprint: string;
|
|
54
|
+
_boundEvents: {
|
|
55
|
+
updateViewarea: ({ location }: {
|
|
56
|
+
location: any;
|
|
57
|
+
}) => void;
|
|
58
|
+
popState: ({ state }: {
|
|
59
|
+
state: any;
|
|
60
|
+
}) => void;
|
|
61
|
+
pageHide: () => void;
|
|
62
|
+
} | null;
|
|
63
|
+
_isPagesLoaded: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Initialize the history for the PDF document, using either the current
|
|
66
|
+
* browser history entry or the document hash, whichever is present.
|
|
67
|
+
* @param {InitializeParameters} params
|
|
68
|
+
*/
|
|
69
|
+
initialize({ fingerprint, resetHistory, updateUrl }: InitializeParameters): void;
|
|
70
|
+
_updateUrl: boolean | undefined;
|
|
71
|
+
_popStateInProgress: boolean | undefined;
|
|
72
|
+
_blockHashChange: number | undefined;
|
|
73
|
+
_currentHash: string | undefined;
|
|
74
|
+
_numPositionUpdates: number | undefined;
|
|
75
|
+
_uid: any;
|
|
76
|
+
_maxUid: any;
|
|
77
|
+
_destination: any;
|
|
78
|
+
_position: {
|
|
79
|
+
hash: any;
|
|
80
|
+
page: number;
|
|
81
|
+
first: any;
|
|
82
|
+
rotation: any;
|
|
83
|
+
} | null | undefined;
|
|
84
|
+
_initialRotation: any;
|
|
85
|
+
_initialBookmark: any;
|
|
86
|
+
/**
|
|
87
|
+
* Reset the current `PDFHistory` instance, and consequently prevent any
|
|
88
|
+
* further updates and/or navigation of the browser history.
|
|
89
|
+
*/
|
|
90
|
+
reset(): void;
|
|
91
|
+
_updateViewareaTimeout: any;
|
|
92
|
+
/**
|
|
93
|
+
* Push an internal destination to the browser history.
|
|
94
|
+
* @param {PushParameters}
|
|
95
|
+
*/
|
|
96
|
+
push({ namedDest, explicitDest, pageNumber }: PushParameters): void;
|
|
97
|
+
/**
|
|
98
|
+
* Push a page to the browser history; generally the `push` method should be
|
|
99
|
+
* used instead.
|
|
100
|
+
* @param {number} pageNumber
|
|
101
|
+
*/
|
|
102
|
+
pushPage(pageNumber: number): void;
|
|
103
|
+
/**
|
|
104
|
+
* Push the current position to the browser history.
|
|
105
|
+
*/
|
|
106
|
+
pushCurrentPosition(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Go back one step in the browser history.
|
|
109
|
+
* NOTE: Avoids navigating away from the document, useful for "named actions".
|
|
110
|
+
*/
|
|
111
|
+
back(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Go forward one step in the browser history.
|
|
114
|
+
* NOTE: Avoids navigating away from the document, useful for "named actions".
|
|
115
|
+
*/
|
|
116
|
+
forward(): void;
|
|
117
|
+
/**
|
|
118
|
+
* @type {boolean} Indicating if the user is currently moving through the
|
|
119
|
+
* browser history, useful e.g. for skipping the next 'hashchange' event.
|
|
120
|
+
*/
|
|
121
|
+
get popStateInProgress(): boolean;
|
|
122
|
+
get initialBookmark(): any;
|
|
123
|
+
get initialRotation(): any;
|
|
124
|
+
/**
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
private _pushOrReplaceState;
|
|
128
|
+
/**
|
|
129
|
+
* @private
|
|
130
|
+
*/
|
|
131
|
+
private _tryPushCurrentPosition;
|
|
132
|
+
/**
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
private _isValidPage;
|
|
136
|
+
/**
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
private _isValidState;
|
|
140
|
+
/**
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
private _updateInternalState;
|
|
144
|
+
/**
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
private _parseCurrentHash;
|
|
148
|
+
/**
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
private _updateViewarea;
|
|
152
|
+
/**
|
|
153
|
+
* @private
|
|
154
|
+
*/
|
|
155
|
+
private _popState;
|
|
156
|
+
/**
|
|
157
|
+
* @private
|
|
158
|
+
*/
|
|
159
|
+
private _pageHide;
|
|
160
|
+
/**
|
|
161
|
+
* @private
|
|
162
|
+
*/
|
|
163
|
+
private _bindEvents;
|
|
164
|
+
/**
|
|
165
|
+
* @private
|
|
166
|
+
*/
|
|
167
|
+
private _unbindEvents;
|
|
168
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
export type ExternalLinkParameters = {
|
|
2
|
+
/**
|
|
3
|
+
* - An absolute URL.
|
|
4
|
+
*/
|
|
5
|
+
url: string;
|
|
6
|
+
/**
|
|
7
|
+
* - The link target. The default value is
|
|
8
|
+
* `LinkTarget.NONE`.
|
|
9
|
+
*/
|
|
10
|
+
target?: {
|
|
11
|
+
NONE: number;
|
|
12
|
+
SELF: number;
|
|
13
|
+
BLANK: number;
|
|
14
|
+
PARENT: number;
|
|
15
|
+
TOP: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* - The link relationship. The default value is
|
|
19
|
+
* `DEFAULT_LINK_REL`.
|
|
20
|
+
*/
|
|
21
|
+
rel?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* - Whether the link should be enabled. The
|
|
24
|
+
* default value is true.
|
|
25
|
+
*/
|
|
26
|
+
enabled?: boolean | undefined;
|
|
27
|
+
};
|
|
28
|
+
export type EventBus = import("./event_utils").EventBus;
|
|
29
|
+
export type IPDFLinkService = import("./interfaces").IPDFLinkService;
|
|
30
|
+
export type PDFLinkServiceOptions = {
|
|
31
|
+
/**
|
|
32
|
+
* - The application event bus.
|
|
33
|
+
*/
|
|
34
|
+
eventBus: EventBus;
|
|
35
|
+
/**
|
|
36
|
+
* - Specifies the `target` attribute
|
|
37
|
+
* for external links. Must use one of the values from {LinkTarget}.
|
|
38
|
+
* Defaults to using no target.
|
|
39
|
+
*/
|
|
40
|
+
externalLinkTarget?: number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* - Specifies the `rel` attribute for
|
|
43
|
+
* external links. Defaults to stripping the referrer.
|
|
44
|
+
*/
|
|
45
|
+
externalLinkRel?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* - Ignores the zoom argument,
|
|
48
|
+
* thus preserving the current zoom level in the viewer, when navigating
|
|
49
|
+
* to internal destinations. The default value is `false`.
|
|
50
|
+
*/
|
|
51
|
+
ignoreDestinationZoom?: boolean | undefined;
|
|
52
|
+
};
|
|
53
|
+
export namespace LinkTarget {
|
|
54
|
+
let NONE: number;
|
|
55
|
+
let SELF: number;
|
|
56
|
+
let BLANK: number;
|
|
57
|
+
let PARENT: number;
|
|
58
|
+
let TOP: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object} PDFLinkServiceOptions
|
|
62
|
+
* @property {EventBus} eventBus - The application event bus.
|
|
63
|
+
* @property {number} [externalLinkTarget] - Specifies the `target` attribute
|
|
64
|
+
* for external links. Must use one of the values from {LinkTarget}.
|
|
65
|
+
* Defaults to using no target.
|
|
66
|
+
* @property {string} [externalLinkRel] - Specifies the `rel` attribute for
|
|
67
|
+
* external links. Defaults to stripping the referrer.
|
|
68
|
+
* @property {boolean} [ignoreDestinationZoom] - Ignores the zoom argument,
|
|
69
|
+
* thus preserving the current zoom level in the viewer, when navigating
|
|
70
|
+
* to internal destinations. The default value is `false`.
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* Performs navigation functions inside PDF, such as opening specified page,
|
|
74
|
+
* or destination.
|
|
75
|
+
* @implements {IPDFLinkService}
|
|
76
|
+
*/
|
|
77
|
+
export class PDFLinkService implements IPDFLinkService {
|
|
78
|
+
static "__#42@#isValidExplicitDestination"(dest: any): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @param {PDFLinkServiceOptions} options
|
|
81
|
+
*/
|
|
82
|
+
constructor({ eventBus, externalLinkTarget, externalLinkRel, ignoreDestinationZoom, }?: PDFLinkServiceOptions);
|
|
83
|
+
eventBus: import("./event_utils").EventBus;
|
|
84
|
+
externalLinkTarget: number;
|
|
85
|
+
externalLinkRel: string;
|
|
86
|
+
externalLinkEnabled: boolean;
|
|
87
|
+
_ignoreDestinationZoom: boolean;
|
|
88
|
+
baseUrl: any;
|
|
89
|
+
pdfDocument: any;
|
|
90
|
+
pdfViewer: any;
|
|
91
|
+
pdfHistory: any;
|
|
92
|
+
setDocument(pdfDocument: any, baseUrl?: null): void;
|
|
93
|
+
setViewer(pdfViewer: any): void;
|
|
94
|
+
setHistory(pdfHistory: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* @type {number}
|
|
97
|
+
*/
|
|
98
|
+
get pagesCount(): number;
|
|
99
|
+
/**
|
|
100
|
+
* @param {number} value
|
|
101
|
+
*/
|
|
102
|
+
set page(arg: number);
|
|
103
|
+
/**
|
|
104
|
+
* @type {number}
|
|
105
|
+
*/
|
|
106
|
+
get page(): number;
|
|
107
|
+
/**
|
|
108
|
+
* @param {number} value
|
|
109
|
+
*/
|
|
110
|
+
set rotation(arg: number);
|
|
111
|
+
/**
|
|
112
|
+
* @type {number}
|
|
113
|
+
*/
|
|
114
|
+
get rotation(): number;
|
|
115
|
+
/**
|
|
116
|
+
* @type {boolean}
|
|
117
|
+
*/
|
|
118
|
+
get isInPresentationMode(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* This method will, when available, also update the browser history.
|
|
121
|
+
*
|
|
122
|
+
* @param {string|Array} dest - The named, or explicit, PDF destination.
|
|
123
|
+
*/
|
|
124
|
+
goToDestination(dest: string | any[]): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* This method will, when available, also update the browser history.
|
|
127
|
+
*
|
|
128
|
+
* @param {number|string} val - The page number, or page label.
|
|
129
|
+
*/
|
|
130
|
+
goToPage(val: number | string): void;
|
|
131
|
+
/**
|
|
132
|
+
* Wrapper around the `addLinkAttributes` helper function.
|
|
133
|
+
* @param {HTMLAnchorElement} link
|
|
134
|
+
* @param {string} url
|
|
135
|
+
* @param {boolean} [newWindow]
|
|
136
|
+
*/
|
|
137
|
+
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
|
|
138
|
+
/**
|
|
139
|
+
* @param {string|Array} dest - The PDF destination object.
|
|
140
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
141
|
+
*/
|
|
142
|
+
getDestinationHash(dest: string | any[]): string;
|
|
143
|
+
/**
|
|
144
|
+
* Prefix the full url on anchor links to make sure that links are resolved
|
|
145
|
+
* relative to the current URL instead of the one defined in <base href>.
|
|
146
|
+
* @param {string} anchor - The anchor hash, including the #.
|
|
147
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
148
|
+
*/
|
|
149
|
+
getAnchorUrl(anchor: string): string;
|
|
150
|
+
/**
|
|
151
|
+
* @param {string} hash
|
|
152
|
+
*/
|
|
153
|
+
setHash(hash: string): void;
|
|
154
|
+
/**
|
|
155
|
+
* @param {string} action
|
|
156
|
+
*/
|
|
157
|
+
executeNamedAction(action: string): void;
|
|
158
|
+
/**
|
|
159
|
+
* @param {Object} action
|
|
160
|
+
*/
|
|
161
|
+
executeSetOCGState(action: Object): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* @param {number} pageNum - page number.
|
|
164
|
+
* @param {Object} pageRef - reference to the page.
|
|
165
|
+
*/
|
|
166
|
+
cachePageRef(pageNum: number, pageRef: Object): void;
|
|
167
|
+
/**
|
|
168
|
+
* @ignore
|
|
169
|
+
*/
|
|
170
|
+
_cachedPageNumber(pageRef: any): any;
|
|
171
|
+
#private;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @implements {IPDFLinkService}
|
|
175
|
+
*/
|
|
176
|
+
export class SimpleLinkService implements IPDFLinkService {
|
|
177
|
+
externalLinkEnabled: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* @type {number}
|
|
180
|
+
*/
|
|
181
|
+
get pagesCount(): number;
|
|
182
|
+
/**
|
|
183
|
+
* @param {number} value
|
|
184
|
+
*/
|
|
185
|
+
set page(arg: number);
|
|
186
|
+
/**
|
|
187
|
+
* @type {number}
|
|
188
|
+
*/
|
|
189
|
+
get page(): number;
|
|
190
|
+
/**
|
|
191
|
+
* @param {number} value
|
|
192
|
+
*/
|
|
193
|
+
set rotation(arg: number);
|
|
194
|
+
/**
|
|
195
|
+
* @type {number}
|
|
196
|
+
*/
|
|
197
|
+
get rotation(): number;
|
|
198
|
+
/**
|
|
199
|
+
* @type {boolean}
|
|
200
|
+
*/
|
|
201
|
+
get isInPresentationMode(): boolean;
|
|
202
|
+
/**
|
|
203
|
+
* @param {string|Array} dest - The named, or explicit, PDF destination.
|
|
204
|
+
*/
|
|
205
|
+
goToDestination(dest: string | any[]): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* @param {number|string} val - The page number, or page label.
|
|
208
|
+
*/
|
|
209
|
+
goToPage(val: number | string): void;
|
|
210
|
+
/**
|
|
211
|
+
* @param {HTMLAnchorElement} link
|
|
212
|
+
* @param {string} url
|
|
213
|
+
* @param {boolean} [newWindow]
|
|
214
|
+
*/
|
|
215
|
+
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
|
|
216
|
+
/**
|
|
217
|
+
* @param dest - The PDF destination object.
|
|
218
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
219
|
+
*/
|
|
220
|
+
getDestinationHash(dest: any): string;
|
|
221
|
+
/**
|
|
222
|
+
* @param hash - The PDF parameters/hash.
|
|
223
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
224
|
+
*/
|
|
225
|
+
getAnchorUrl(hash: any): string;
|
|
226
|
+
/**
|
|
227
|
+
* @param {string} hash
|
|
228
|
+
*/
|
|
229
|
+
setHash(hash: string): void;
|
|
230
|
+
/**
|
|
231
|
+
* @param {string} action
|
|
232
|
+
*/
|
|
233
|
+
executeNamedAction(action: string): void;
|
|
234
|
+
/**
|
|
235
|
+
* @param {Object} action
|
|
236
|
+
*/
|
|
237
|
+
executeSetOCGState(action: Object): void;
|
|
238
|
+
/**
|
|
239
|
+
* @param {number} pageNum - page number.
|
|
240
|
+
* @param {Object} pageRef - reference to the page.
|
|
241
|
+
*/
|
|
242
|
+
cachePageRef(pageNum: number, pageRef: Object): void;
|
|
243
|
+
}
|