@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,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic text editor in order to create a FreeTex annotation.
|
|
3
|
+
*/
|
|
4
|
+
export class StampEditor extends AnnotationEditor {
|
|
5
|
+
static _type: string;
|
|
6
|
+
static get supportedTypes(): any;
|
|
7
|
+
static get supportedTypesStr(): any;
|
|
8
|
+
/** @inheritdoc */
|
|
9
|
+
static isHandlingMimeForPasting(mime: any): any;
|
|
10
|
+
/** @inheritdoc */
|
|
11
|
+
static paste(item: any, parent: any): void;
|
|
12
|
+
/** @inheritdoc */
|
|
13
|
+
static deserialize(data: any, parent: any, uiManager: any): AnnotationEditor | null;
|
|
14
|
+
constructor(params: any);
|
|
15
|
+
/** @inheritdoc */
|
|
16
|
+
render(): HTMLDivElement | null;
|
|
17
|
+
/** @inheritdoc */
|
|
18
|
+
serialize(isForCopying?: boolean, context?: null): {
|
|
19
|
+
annotationType: number;
|
|
20
|
+
bitmapId: null;
|
|
21
|
+
pageIndex: number;
|
|
22
|
+
rect: any[];
|
|
23
|
+
rotation: number;
|
|
24
|
+
isSvg: boolean;
|
|
25
|
+
} | null;
|
|
26
|
+
#private;
|
|
27
|
+
}
|
|
28
|
+
import { AnnotationEditor } from "./editor.js";
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
export type AnnotationEditor = import("./editor.js").AnnotationEditor;
|
|
2
|
+
export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;
|
|
3
|
+
/**
|
|
4
|
+
* A pdf has several pages and each of them when it will rendered
|
|
5
|
+
* will have an AnnotationEditorLayer which will contain the some
|
|
6
|
+
* new Annotations associated to an editor in order to modify them.
|
|
7
|
+
*
|
|
8
|
+
* This class is used to manage all the different layers, editors and
|
|
9
|
+
* some action like copy/paste, undo/redo, ...
|
|
10
|
+
*/
|
|
11
|
+
export class AnnotationEditorUIManager {
|
|
12
|
+
static TRANSLATE_SMALL: number;
|
|
13
|
+
static TRANSLATE_BIG: number;
|
|
14
|
+
static get _keyboardManager(): any;
|
|
15
|
+
constructor(container: any, viewer: any, eventBus: any, pdfDocument: any, pageColors: any);
|
|
16
|
+
viewParameters: {
|
|
17
|
+
realScale: number;
|
|
18
|
+
rotation: number;
|
|
19
|
+
};
|
|
20
|
+
destroy(): void;
|
|
21
|
+
get hcmFilter(): any;
|
|
22
|
+
onPageChanging({ pageNumber }: {
|
|
23
|
+
pageNumber: any;
|
|
24
|
+
}): void;
|
|
25
|
+
focusMainContainer(): void;
|
|
26
|
+
findParent(x: any, y: any): any;
|
|
27
|
+
disableUserSelect(value?: boolean): void;
|
|
28
|
+
addShouldRescale(editor: any): void;
|
|
29
|
+
removeShouldRescale(editor: any): void;
|
|
30
|
+
onScaleChanging({ scale }: {
|
|
31
|
+
scale: any;
|
|
32
|
+
}): void;
|
|
33
|
+
onRotationChanging({ pagesRotation }: {
|
|
34
|
+
pagesRotation: any;
|
|
35
|
+
}): void;
|
|
36
|
+
/**
|
|
37
|
+
* Add an editor in the annotation storage.
|
|
38
|
+
* @param {AnnotationEditor} editor
|
|
39
|
+
*/
|
|
40
|
+
addToAnnotationStorage(editor: AnnotationEditor): void;
|
|
41
|
+
blur(): void;
|
|
42
|
+
focus(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Copy callback.
|
|
45
|
+
* @param {ClipboardEvent} event
|
|
46
|
+
*/
|
|
47
|
+
copy(event: ClipboardEvent): void;
|
|
48
|
+
/**
|
|
49
|
+
* Cut callback.
|
|
50
|
+
* @param {ClipboardEvent} event
|
|
51
|
+
*/
|
|
52
|
+
cut(event: ClipboardEvent): void;
|
|
53
|
+
/**
|
|
54
|
+
* Paste callback.
|
|
55
|
+
* @param {ClipboardEvent} event
|
|
56
|
+
*/
|
|
57
|
+
paste(event: ClipboardEvent): void;
|
|
58
|
+
/**
|
|
59
|
+
* Keydown callback.
|
|
60
|
+
* @param {KeyboardEvent} event
|
|
61
|
+
*/
|
|
62
|
+
keydown(event: KeyboardEvent): void;
|
|
63
|
+
/**
|
|
64
|
+
* Execute an action for a given name.
|
|
65
|
+
* For example, the user can click on the "Undo" entry in the context menu
|
|
66
|
+
* and it'll trigger the undo action.
|
|
67
|
+
* @param {Object} details
|
|
68
|
+
*/
|
|
69
|
+
onEditingAction(details: Object): void;
|
|
70
|
+
/**
|
|
71
|
+
* Set the editing state.
|
|
72
|
+
* It can be useful to temporarily disable it when the user is editing a
|
|
73
|
+
* FreeText annotation.
|
|
74
|
+
* @param {boolean} isEditing
|
|
75
|
+
*/
|
|
76
|
+
setEditingState(isEditing: boolean): void;
|
|
77
|
+
registerEditorTypes(types: any): void;
|
|
78
|
+
/**
|
|
79
|
+
* Get an id.
|
|
80
|
+
* @returns {string}
|
|
81
|
+
*/
|
|
82
|
+
getId(): string;
|
|
83
|
+
get currentLayer(): any;
|
|
84
|
+
getLayer(pageIndex: any): any;
|
|
85
|
+
get currentPageIndex(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Add a new layer for a page which will contains the editors.
|
|
88
|
+
* @param {AnnotationEditorLayer} layer
|
|
89
|
+
*/
|
|
90
|
+
addLayer(layer: AnnotationEditorLayer): void;
|
|
91
|
+
/**
|
|
92
|
+
* Remove a layer.
|
|
93
|
+
* @param {AnnotationEditorLayer} layer
|
|
94
|
+
*/
|
|
95
|
+
removeLayer(layer: AnnotationEditorLayer): void;
|
|
96
|
+
/**
|
|
97
|
+
* Change the editor mode (None, FreeText, Ink, ...)
|
|
98
|
+
* @param {number} mode
|
|
99
|
+
* @param {string|null} editId
|
|
100
|
+
*/
|
|
101
|
+
updateMode(mode: number, editId?: string | null): void;
|
|
102
|
+
/**
|
|
103
|
+
* Update the toolbar if it's required to reflect the tool currently used.
|
|
104
|
+
* @param {number} mode
|
|
105
|
+
* @returns {undefined}
|
|
106
|
+
*/
|
|
107
|
+
updateToolbar(mode: number): undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Update a parameter in the current editor or globally.
|
|
110
|
+
* @param {number} type
|
|
111
|
+
* @param {*} value
|
|
112
|
+
*/
|
|
113
|
+
updateParams(type: number, value: any): void;
|
|
114
|
+
enableWaiting(mustWait?: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Get all the editors belonging to a given page.
|
|
117
|
+
* @param {number} pageIndex
|
|
118
|
+
* @returns {Array<AnnotationEditor>}
|
|
119
|
+
*/
|
|
120
|
+
getEditors(pageIndex: number): Array<AnnotationEditor>;
|
|
121
|
+
/**
|
|
122
|
+
* Get an editor with the given id.
|
|
123
|
+
* @param {string} id
|
|
124
|
+
* @returns {AnnotationEditor}
|
|
125
|
+
*/
|
|
126
|
+
getEditor(id: string): AnnotationEditor;
|
|
127
|
+
/**
|
|
128
|
+
* Add a new editor.
|
|
129
|
+
* @param {AnnotationEditor} editor
|
|
130
|
+
*/
|
|
131
|
+
addEditor(editor: AnnotationEditor): void;
|
|
132
|
+
/**
|
|
133
|
+
* Remove an editor.
|
|
134
|
+
* @param {AnnotationEditor} editor
|
|
135
|
+
*/
|
|
136
|
+
removeEditor(editor: AnnotationEditor): void;
|
|
137
|
+
/**
|
|
138
|
+
* The annotation element with the given id has been deleted.
|
|
139
|
+
* @param {AnnotationEditor} editor
|
|
140
|
+
*/
|
|
141
|
+
addDeletedAnnotationElement(editor: AnnotationEditor): void;
|
|
142
|
+
/**
|
|
143
|
+
* Check if the annotation element with the given id has been deleted.
|
|
144
|
+
* @param {string} annotationElementId
|
|
145
|
+
* @returns {boolean}
|
|
146
|
+
*/
|
|
147
|
+
isDeletedAnnotationElement(annotationElementId: string): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* The annotation element with the given id have been restored.
|
|
150
|
+
* @param {AnnotationEditor} editor
|
|
151
|
+
*/
|
|
152
|
+
removeDeletedAnnotationElement(editor: AnnotationEditor): void;
|
|
153
|
+
/**
|
|
154
|
+
* Set the given editor as the active one.
|
|
155
|
+
* @param {AnnotationEditor} editor
|
|
156
|
+
*/
|
|
157
|
+
setActiveEditor(editor: AnnotationEditor): void;
|
|
158
|
+
/**
|
|
159
|
+
* Add or remove an editor the current selection.
|
|
160
|
+
* @param {AnnotationEditor} editor
|
|
161
|
+
*/
|
|
162
|
+
toggleSelected(editor: AnnotationEditor): void;
|
|
163
|
+
/**
|
|
164
|
+
* Set the last selected editor.
|
|
165
|
+
* @param {AnnotationEditor} editor
|
|
166
|
+
*/
|
|
167
|
+
setSelected(editor: AnnotationEditor): void;
|
|
168
|
+
/**
|
|
169
|
+
* Check if the editor is selected.
|
|
170
|
+
* @param {AnnotationEditor} editor
|
|
171
|
+
*/
|
|
172
|
+
isSelected(editor: AnnotationEditor): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Unselect an editor.
|
|
175
|
+
* @param {AnnotationEditor} editor
|
|
176
|
+
*/
|
|
177
|
+
unselect(editor: AnnotationEditor): void;
|
|
178
|
+
get hasSelection(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Undo the last command.
|
|
181
|
+
*/
|
|
182
|
+
undo(): void;
|
|
183
|
+
/**
|
|
184
|
+
* Redo the last undoed command.
|
|
185
|
+
*/
|
|
186
|
+
redo(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Add a command to execute (cmd) and another one to undo it.
|
|
189
|
+
* @param {Object} params
|
|
190
|
+
*/
|
|
191
|
+
addCommands(params: Object): void;
|
|
192
|
+
/**
|
|
193
|
+
* Delete the current editor or all.
|
|
194
|
+
*/
|
|
195
|
+
delete(): void;
|
|
196
|
+
commitOrRemove(): void;
|
|
197
|
+
hasSomethingToControl(): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Select all the editors.
|
|
200
|
+
*/
|
|
201
|
+
selectAll(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Unselect all the selected editors.
|
|
204
|
+
*/
|
|
205
|
+
unselectAll(): void;
|
|
206
|
+
translateSelectedEditors(x: any, y: any, noCommit?: boolean): void;
|
|
207
|
+
/**
|
|
208
|
+
* Set up the drag session for moving the selected editors.
|
|
209
|
+
*/
|
|
210
|
+
setUpDragSession(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Ends the drag session.
|
|
213
|
+
* @returns {boolean} true if at least one editor has been moved.
|
|
214
|
+
*/
|
|
215
|
+
endDragSession(): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Drag the set of selected editors.
|
|
218
|
+
* @param {number} tx
|
|
219
|
+
* @param {number} ty
|
|
220
|
+
*/
|
|
221
|
+
dragSelectedEditors(tx: number, ty: number): void;
|
|
222
|
+
/**
|
|
223
|
+
* Rebuild the editor (usually on undo/redo actions) on a potentially
|
|
224
|
+
* non-rendered page.
|
|
225
|
+
* @param {AnnotationEditor} editor
|
|
226
|
+
*/
|
|
227
|
+
rebuild(editor: AnnotationEditor): void;
|
|
228
|
+
/**
|
|
229
|
+
* Is the current editor the one passed as argument?
|
|
230
|
+
* @param {AnnotationEditor} editor
|
|
231
|
+
* @returns
|
|
232
|
+
*/
|
|
233
|
+
isActive(editor: AnnotationEditor): boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Get the current active editor.
|
|
236
|
+
* @returns {AnnotationEditor|null}
|
|
237
|
+
*/
|
|
238
|
+
getActive(): AnnotationEditor | null;
|
|
239
|
+
/**
|
|
240
|
+
* Get the current editor mode.
|
|
241
|
+
* @returns {number}
|
|
242
|
+
*/
|
|
243
|
+
getMode(): number;
|
|
244
|
+
get imageManager(): any;
|
|
245
|
+
#private;
|
|
246
|
+
}
|
|
247
|
+
export function bindEvents(obj: any, element: any, names: any): void;
|
|
248
|
+
export class ColorManager {
|
|
249
|
+
static _colorsMapping: Map<string, number[]>;
|
|
250
|
+
get _colors(): any;
|
|
251
|
+
/**
|
|
252
|
+
* In High Contrast Mode, the color on the screen is not always the
|
|
253
|
+
* real color used in the pdf.
|
|
254
|
+
* For example in some cases white can appear to be black but when saving
|
|
255
|
+
* we want to have white.
|
|
256
|
+
* @param {string} color
|
|
257
|
+
* @returns {Array<number>}
|
|
258
|
+
*/
|
|
259
|
+
convert(color: string): Array<number>;
|
|
260
|
+
/**
|
|
261
|
+
* An input element must have its color value as a hex string
|
|
262
|
+
* and not as color name.
|
|
263
|
+
* So this function converts a name into an hex string.
|
|
264
|
+
* @param {string} name
|
|
265
|
+
* @returns {string}
|
|
266
|
+
*/
|
|
267
|
+
getHexCode(name: string): string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Class to handle undo/redo.
|
|
271
|
+
* Commands are just saved in a buffer.
|
|
272
|
+
* If we hit some memory issues we could likely use a circular buffer.
|
|
273
|
+
* It has to be used as a singleton.
|
|
274
|
+
*/
|
|
275
|
+
export class CommandManager {
|
|
276
|
+
constructor(maxSize?: number);
|
|
277
|
+
/**
|
|
278
|
+
* @typedef {Object} addOptions
|
|
279
|
+
* @property {function} cmd
|
|
280
|
+
* @property {function} undo
|
|
281
|
+
* @property {boolean} mustExec
|
|
282
|
+
* @property {number} type
|
|
283
|
+
* @property {boolean} overwriteIfSameType
|
|
284
|
+
* @property {boolean} keepUndo
|
|
285
|
+
*/
|
|
286
|
+
/**
|
|
287
|
+
* Add a new couple of commands to be used in case of redo/undo.
|
|
288
|
+
* @param {addOptions} options
|
|
289
|
+
*/
|
|
290
|
+
add({ cmd, undo, mustExec, type, overwriteIfSameType, keepUndo, }: {
|
|
291
|
+
cmd: Function;
|
|
292
|
+
undo: Function;
|
|
293
|
+
mustExec: boolean;
|
|
294
|
+
type: number;
|
|
295
|
+
overwriteIfSameType: boolean;
|
|
296
|
+
keepUndo: boolean;
|
|
297
|
+
}): void;
|
|
298
|
+
/**
|
|
299
|
+
* Undo the last command.
|
|
300
|
+
*/
|
|
301
|
+
undo(): void;
|
|
302
|
+
/**
|
|
303
|
+
* Redo the last command.
|
|
304
|
+
*/
|
|
305
|
+
redo(): void;
|
|
306
|
+
/**
|
|
307
|
+
* Check if there is something to undo.
|
|
308
|
+
* @returns {boolean}
|
|
309
|
+
*/
|
|
310
|
+
hasSomethingToUndo(): boolean;
|
|
311
|
+
/**
|
|
312
|
+
* Check if there is something to redo.
|
|
313
|
+
* @returns {boolean}
|
|
314
|
+
*/
|
|
315
|
+
hasSomethingToRedo(): boolean;
|
|
316
|
+
destroy(): void;
|
|
317
|
+
#private;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Class to handle the different keyboards shortcuts we can have on mac or
|
|
321
|
+
* non-mac OSes.
|
|
322
|
+
*/
|
|
323
|
+
export class KeyboardManager {
|
|
324
|
+
/**
|
|
325
|
+
* Create a new keyboard manager class.
|
|
326
|
+
* @param {Array<Array>} callbacks - an array containing an array of shortcuts
|
|
327
|
+
* and a callback to call.
|
|
328
|
+
* A shortcut is a string like `ctrl+c` or `mac+ctrl+c` for mac OS.
|
|
329
|
+
*/
|
|
330
|
+
constructor(callbacks: Array<any[]>);
|
|
331
|
+
buffer: any[];
|
|
332
|
+
callbacks: Map<any, any>;
|
|
333
|
+
allKeys: Set<any>;
|
|
334
|
+
/**
|
|
335
|
+
* Execute a callback, if any, for a given keyboard event.
|
|
336
|
+
* The self is used as `this` in the callback.
|
|
337
|
+
* @param {Object} self.
|
|
338
|
+
* @param {KeyboardEvent} event
|
|
339
|
+
* @returns
|
|
340
|
+
*/
|
|
341
|
+
exec(self: any, event: KeyboardEvent): void;
|
|
342
|
+
#private;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Convert a number between 0 and 100 into an hex number between 0 and 255.
|
|
346
|
+
* @param {number} opacity
|
|
347
|
+
* @return {string}
|
|
348
|
+
*/
|
|
349
|
+
export function opacityToHex(opacity: number): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export class FontFaceObject {
|
|
2
|
+
constructor(translatedData: any, { isEvalSupported, disableFontFace, ignoreErrors, inspectFont, }: {
|
|
3
|
+
isEvalSupported?: boolean | undefined;
|
|
4
|
+
disableFontFace?: boolean | undefined;
|
|
5
|
+
ignoreErrors?: boolean | undefined;
|
|
6
|
+
inspectFont?: null | undefined;
|
|
7
|
+
});
|
|
8
|
+
compiledGlyphs: any;
|
|
9
|
+
isEvalSupported: boolean;
|
|
10
|
+
disableFontFace: boolean;
|
|
11
|
+
ignoreErrors: boolean;
|
|
12
|
+
_inspectFont: any;
|
|
13
|
+
createNativeFontFace(): FontFace | null;
|
|
14
|
+
createFontFaceRule(): string | null;
|
|
15
|
+
getPathGenerator(objs: any, character: any): any;
|
|
16
|
+
}
|
|
17
|
+
export class FontLoader {
|
|
18
|
+
constructor({ ownerDocument, styleElement, }: {
|
|
19
|
+
ownerDocument?: Document | undefined;
|
|
20
|
+
styleElement?: null | undefined;
|
|
21
|
+
});
|
|
22
|
+
_document: Document;
|
|
23
|
+
nativeFontFaces: Set<any>;
|
|
24
|
+
styleElement: HTMLStyleElement | null;
|
|
25
|
+
loadingRequests: any[] | undefined;
|
|
26
|
+
loadTestFontId: number | undefined;
|
|
27
|
+
addNativeFontFace(nativeFontFace: any): void;
|
|
28
|
+
removeNativeFontFace(nativeFontFace: any): void;
|
|
29
|
+
insertRule(rule: any): void;
|
|
30
|
+
clear(): void;
|
|
31
|
+
loadSystemFont(info: any): Promise<void>;
|
|
32
|
+
bind(font: any): Promise<void>;
|
|
33
|
+
get isFontLoadingAPISupported(): any;
|
|
34
|
+
get isSyncFontLoadingSupported(): any;
|
|
35
|
+
_queueLoadingCallback(callback: any): {
|
|
36
|
+
done: boolean;
|
|
37
|
+
complete: () => void;
|
|
38
|
+
callback: any;
|
|
39
|
+
};
|
|
40
|
+
get _loadTestFont(): any;
|
|
41
|
+
_prepareFontLoadEvent(font: any, request: any): void;
|
|
42
|
+
#private;
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class OptionalContentConfig {
|
|
2
|
+
constructor(data: any);
|
|
3
|
+
name: any;
|
|
4
|
+
creator: any;
|
|
5
|
+
isVisible(group: any): any;
|
|
6
|
+
setVisibility(id: any, visible?: boolean): void;
|
|
7
|
+
get hasInitialVisibility(): boolean;
|
|
8
|
+
getOrder(): any;
|
|
9
|
+
getGroups(): any;
|
|
10
|
+
getGroup(id: any): any;
|
|
11
|
+
getHash(): string;
|
|
12
|
+
#private;
|
|
13
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export function getShadingPattern(IR: any): RadialAxialShadingPattern | MeshShadingPattern | DummyShadingPattern;
|
|
2
|
+
export namespace PathType {
|
|
3
|
+
let FILL: string;
|
|
4
|
+
let STROKE: string;
|
|
5
|
+
let SHADING: string;
|
|
6
|
+
}
|
|
7
|
+
export class TilingPattern {
|
|
8
|
+
static MAX_PATTERN_SIZE: number;
|
|
9
|
+
constructor(IR: any, color: any, ctx: any, canvasGraphicsFactory: any, baseTransform: any);
|
|
10
|
+
operatorList: any;
|
|
11
|
+
matrix: any;
|
|
12
|
+
bbox: any;
|
|
13
|
+
xstep: any;
|
|
14
|
+
ystep: any;
|
|
15
|
+
paintType: any;
|
|
16
|
+
tilingType: any;
|
|
17
|
+
color: any;
|
|
18
|
+
ctx: any;
|
|
19
|
+
canvasGraphicsFactory: any;
|
|
20
|
+
baseTransform: any;
|
|
21
|
+
createPatternCanvas(owner: any): {
|
|
22
|
+
canvas: any;
|
|
23
|
+
scaleX: any;
|
|
24
|
+
scaleY: any;
|
|
25
|
+
offsetX: any;
|
|
26
|
+
offsetY: any;
|
|
27
|
+
};
|
|
28
|
+
getSizeAndScale(step: any, realOutputSize: any, scale: any): {
|
|
29
|
+
scale: any;
|
|
30
|
+
size: number;
|
|
31
|
+
};
|
|
32
|
+
clipBbox(graphics: any, x0: any, y0: any, x1: any, y1: any): void;
|
|
33
|
+
setFillAndStrokeStyleToContext(graphics: any, paintType: any, color: any): void;
|
|
34
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
35
|
+
}
|
|
36
|
+
declare class RadialAxialShadingPattern extends BaseShadingPattern {
|
|
37
|
+
constructor(IR: any);
|
|
38
|
+
_type: any;
|
|
39
|
+
_bbox: any;
|
|
40
|
+
_colorStops: any;
|
|
41
|
+
_p0: any;
|
|
42
|
+
_p1: any;
|
|
43
|
+
_r0: any;
|
|
44
|
+
_r1: any;
|
|
45
|
+
matrix: any;
|
|
46
|
+
_createGradient(ctx: any): any;
|
|
47
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
48
|
+
}
|
|
49
|
+
declare class MeshShadingPattern extends BaseShadingPattern {
|
|
50
|
+
constructor(IR: any);
|
|
51
|
+
_coords: any;
|
|
52
|
+
_colors: any;
|
|
53
|
+
_figures: any;
|
|
54
|
+
_bounds: any;
|
|
55
|
+
_bbox: any;
|
|
56
|
+
_background: any;
|
|
57
|
+
matrix: any;
|
|
58
|
+
_createMeshCanvas(combinedScale: any, backgroundColor: any, cachedCanvases: any): {
|
|
59
|
+
canvas: any;
|
|
60
|
+
offsetX: number;
|
|
61
|
+
offsetY: number;
|
|
62
|
+
scaleX: number;
|
|
63
|
+
scaleY: number;
|
|
64
|
+
};
|
|
65
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
66
|
+
}
|
|
67
|
+
declare class DummyShadingPattern extends BaseShadingPattern {
|
|
68
|
+
getPattern(): string;
|
|
69
|
+
}
|
|
70
|
+
declare class BaseShadingPattern {
|
|
71
|
+
getPattern(): void;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export type PageViewport = import("./display_utils").PageViewport;
|
|
2
|
+
export type TextContent = import("./api").TextContent;
|
|
3
|
+
/**
|
|
4
|
+
* Text layer render parameters.
|
|
5
|
+
*/
|
|
6
|
+
export type TextLayerRenderParameters = {
|
|
7
|
+
/**
|
|
8
|
+
* - Text content to
|
|
9
|
+
* render, i.e. the value returned by the page's `streamTextContent` or
|
|
10
|
+
* `getTextContent` method.
|
|
11
|
+
*/
|
|
12
|
+
textContentSource: ReadableStream | TextContent;
|
|
13
|
+
/**
|
|
14
|
+
* - The DOM node that will contain the text
|
|
15
|
+
* runs.
|
|
16
|
+
*/
|
|
17
|
+
container: HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* - The target viewport to properly layout
|
|
20
|
+
* the text runs.
|
|
21
|
+
*/
|
|
22
|
+
viewport: PageViewport;
|
|
23
|
+
/**
|
|
24
|
+
* - HTML elements that correspond to
|
|
25
|
+
* the text items of the textContent input.
|
|
26
|
+
* This is output and shall initially be set to an empty array.
|
|
27
|
+
*/
|
|
28
|
+
textDivs?: HTMLElement[] | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* - Some properties
|
|
31
|
+
* weakly mapped to the HTML elements used to render the text.
|
|
32
|
+
*/
|
|
33
|
+
textDivProperties?: WeakMap<HTMLElement, Object> | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* - Strings that correspond to
|
|
36
|
+
* the `str` property of the text items of the textContent input.
|
|
37
|
+
* This is output and shall initially be set to an empty array.
|
|
38
|
+
*/
|
|
39
|
+
textContentItemsStr?: string[] | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* true if we can use
|
|
42
|
+
* OffscreenCanvas to measure string widths.
|
|
43
|
+
*/
|
|
44
|
+
isOffscreenCanvasSupported?: boolean | undefined;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Text layer update parameters.
|
|
48
|
+
*/
|
|
49
|
+
export type TextLayerUpdateParameters = {
|
|
50
|
+
/**
|
|
51
|
+
* - The DOM node that will contain the text
|
|
52
|
+
* runs.
|
|
53
|
+
*/
|
|
54
|
+
container: HTMLElement;
|
|
55
|
+
/**
|
|
56
|
+
* - The target viewport to properly layout
|
|
57
|
+
* the text runs.
|
|
58
|
+
*/
|
|
59
|
+
viewport: PageViewport;
|
|
60
|
+
/**
|
|
61
|
+
* - HTML elements that correspond to
|
|
62
|
+
* the text items of the textContent input.
|
|
63
|
+
* This is output and shall initially be set to an empty array.
|
|
64
|
+
*/
|
|
65
|
+
textDivs?: HTMLElement[] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* - Some properties
|
|
68
|
+
* weakly mapped to the HTML elements used to render the text.
|
|
69
|
+
*/
|
|
70
|
+
textDivProperties?: WeakMap<HTMLElement, Object> | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* true if we can use
|
|
73
|
+
* OffscreenCanvas to measure string widths.
|
|
74
|
+
*/
|
|
75
|
+
isOffscreenCanvasSupported?: boolean | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* true if the text layer must be rotated.
|
|
78
|
+
*/
|
|
79
|
+
mustRotate?: boolean | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* true if the text layer contents must be
|
|
82
|
+
* rescaled.
|
|
83
|
+
*/
|
|
84
|
+
mustRescale?: boolean | undefined;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* @param {TextLayerRenderParameters} params
|
|
88
|
+
* @returns {TextLayerRenderTask}
|
|
89
|
+
*/
|
|
90
|
+
export function renderTextLayer(params: TextLayerRenderParameters): TextLayerRenderTask;
|
|
91
|
+
export class TextLayerRenderTask {
|
|
92
|
+
constructor({ textContentSource, container, viewport, textDivs, textDivProperties, textContentItemsStr, isOffscreenCanvasSupported, }: {
|
|
93
|
+
textContentSource: any;
|
|
94
|
+
container: any;
|
|
95
|
+
viewport: any;
|
|
96
|
+
textDivs: any;
|
|
97
|
+
textDivProperties: any;
|
|
98
|
+
textContentItemsStr: any;
|
|
99
|
+
isOffscreenCanvasSupported: any;
|
|
100
|
+
});
|
|
101
|
+
_textContentSource: any;
|
|
102
|
+
_isReadableStream: boolean;
|
|
103
|
+
_container: any;
|
|
104
|
+
_rootContainer: any;
|
|
105
|
+
_textDivs: any;
|
|
106
|
+
_textContentItemsStr: any;
|
|
107
|
+
_isOffscreenCanvasSupported: any;
|
|
108
|
+
_fontInspectorEnabled: boolean;
|
|
109
|
+
_reader: any;
|
|
110
|
+
_textDivProperties: any;
|
|
111
|
+
_canceled: boolean;
|
|
112
|
+
_capability: PromiseCapability;
|
|
113
|
+
_layoutTextParams: {
|
|
114
|
+
prevFontSize: null;
|
|
115
|
+
prevFontFamily: null;
|
|
116
|
+
div: null;
|
|
117
|
+
scale: number;
|
|
118
|
+
properties: null;
|
|
119
|
+
ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null;
|
|
120
|
+
};
|
|
121
|
+
_transform: any[];
|
|
122
|
+
_pageWidth: any;
|
|
123
|
+
_pageHeight: any;
|
|
124
|
+
/**
|
|
125
|
+
* Promise for textLayer rendering task completion.
|
|
126
|
+
* @type {Promise<void>}
|
|
127
|
+
*/
|
|
128
|
+
get promise(): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Cancel rendering of the textLayer.
|
|
131
|
+
*/
|
|
132
|
+
cancel(): void;
|
|
133
|
+
/**
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
private _processItems;
|
|
137
|
+
/**
|
|
138
|
+
* @private
|
|
139
|
+
*/
|
|
140
|
+
private _layoutText;
|
|
141
|
+
/**
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private _render;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @param {TextLayerUpdateParameters} params
|
|
148
|
+
* @returns {undefined}
|
|
149
|
+
*/
|
|
150
|
+
export function updateTextLayer({ container, viewport, textDivs, textDivProperties, isOffscreenCanvasSupported, mustRotate, mustRescale, }: TextLayerUpdateParameters): undefined;
|
|
151
|
+
import { PromiseCapability } from "../shared/util.js";
|