@progress/kendo-pdfviewer-common 0.3.0-dev.202409251459 → 0.3.0-dev.202410100645
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/dist/es/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es/annotations/annotation-editor-layer.js +780 -0
- package/dist/es/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es/annotations/annotation-layer-builder.js +217 -0
- package/dist/es/annotations/annotation-layer.js +2793 -0
- package/dist/es/annotations/draw-layer-builder.js +65 -0
- package/dist/es/annotations/draw-layer.js +220 -0
- package/dist/es/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es/annotations/editors/free-text-editor.js +783 -0
- package/dist/es/annotations/editors/highlight-editor.js +717 -0
- package/dist/es/annotations/editors/outliner.js +747 -0
- package/dist/es/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es/annotations/helpers/color-manager.js +72 -0
- package/dist/es/annotations/helpers/command-manager.js +133 -0
- package/dist/es/annotations/helpers/id-manager.js +34 -0
- package/dist/es/annotations/helpers/image-manager.js +176 -0
- package/dist/es/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es/annotations/helpers/tools.js +19 -0
- package/dist/es/annotations/shared/display_utils.js +1024 -0
- package/dist/es/annotations/shared/event_utils.js +213 -0
- package/dist/es/annotations/shared/murmurhash3.js +126 -0
- package/dist/es/annotations/shared/scripting_utils.js +90 -0
- package/dist/es/annotations/shared/ui_utils.js +823 -0
- package/dist/es/annotations/shared/utils.js +909 -0
- package/dist/es/common/component.js +33 -0
- package/dist/es/common/core.js +91 -0
- package/dist/es/common/dom.js +11 -0
- package/dist/es/common/main.js +4 -0
- package/dist/es/common/math.js +1 -0
- package/dist/es/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es/links/link-service.js +505 -0
- package/dist/es/main.js +2 -0
- package/dist/es/scroller.js +29 -30
- package/dist/es/text/text-layer-builder.js +288 -0
- package/dist/es/utils.js +5 -5
- package/dist/es/widget/page.js +762 -0
- package/dist/es/widget/pdfviewer.js +1659 -0
- package/dist/es2015/annotations/annotation-editor-layer-builder.js +139 -0
- package/dist/es2015/annotations/annotation-editor-layer.js +780 -0
- package/dist/es2015/annotations/annotation-editor-ui-manager.js +1690 -0
- package/dist/es2015/annotations/annotation-layer-builder.js +217 -0
- package/dist/es2015/annotations/annotation-layer.js +2793 -0
- package/dist/es2015/annotations/draw-layer-builder.js +65 -0
- package/dist/es2015/annotations/draw-layer.js +220 -0
- package/dist/es2015/annotations/editors/annotation-editor.js +1519 -0
- package/dist/es2015/annotations/editors/free-text-editor.js +783 -0
- package/dist/es2015/annotations/editors/highlight-editor.js +717 -0
- package/dist/es2015/annotations/editors/outliner.js +747 -0
- package/dist/es2015/annotations/helpers/annotation-storage.js +294 -0
- package/dist/es2015/annotations/helpers/color-manager.js +72 -0
- package/dist/es2015/annotations/helpers/command-manager.js +133 -0
- package/dist/es2015/annotations/helpers/id-manager.js +34 -0
- package/dist/es2015/annotations/helpers/image-manager.js +176 -0
- package/dist/es2015/annotations/helpers/text-accessibility-manager.js +212 -0
- package/dist/es2015/annotations/helpers/tools.js +19 -0
- package/dist/es2015/annotations/shared/display_utils.js +1024 -0
- package/dist/es2015/annotations/shared/event_utils.js +213 -0
- package/dist/es2015/annotations/shared/murmurhash3.js +126 -0
- package/dist/es2015/annotations/shared/scripting_utils.js +90 -0
- package/dist/es2015/annotations/shared/ui_utils.js +823 -0
- package/dist/es2015/annotations/shared/utils.js +909 -0
- package/dist/es2015/common/component.js +33 -0
- package/dist/es2015/common/core.js +91 -0
- package/dist/es2015/common/dom.js +11 -0
- package/dist/es2015/common/main.js +4 -0
- package/dist/es2015/common/math.js +1 -0
- package/dist/es2015/enums/PdfViewerInteractionMode.js +6 -0
- package/dist/es2015/links/link-service.js +505 -0
- package/dist/es2015/main.js +2 -0
- package/dist/es2015/scroller.js +29 -30
- package/dist/es2015/text/text-layer-builder.js +288 -0
- package/dist/es2015/utils.js +5 -5
- package/dist/es2015/widget/page.js +762 -0
- package/dist/es2015/widget/pdfviewer.js +1659 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.d.ts +39 -0
- package/dist/npm/annotations/annotation-editor-layer-builder.js +142 -0
- package/dist/npm/annotations/annotation-editor-layer.d.ts +196 -0
- package/dist/npm/annotations/annotation-editor-layer.js +783 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.d.ts +281 -0
- package/dist/npm/annotations/annotation-editor-ui-manager.js +1694 -0
- package/dist/npm/annotations/annotation-layer-builder.d.ts +58 -0
- package/dist/npm/annotations/annotation-layer-builder.js +220 -0
- package/dist/npm/annotations/annotation-layer.d.ts +134 -0
- package/dist/npm/annotations/annotation-layer.js +2794 -0
- package/dist/npm/annotations/draw-layer-builder.d.ts +21 -0
- package/dist/npm/annotations/draw-layer-builder.js +68 -0
- package/dist/npm/annotations/draw-layer.d.ts +33 -0
- package/dist/npm/annotations/draw-layer.js +223 -0
- package/dist/npm/annotations/editors/annotation-editor.d.ts +349 -0
- package/dist/npm/annotations/editors/annotation-editor.js +1523 -0
- package/dist/npm/annotations/editors/free-text-editor.d.ts +108 -0
- package/dist/npm/annotations/editors/free-text-editor.js +786 -0
- package/dist/npm/annotations/editors/highlight-editor.d.ts +114 -0
- package/dist/npm/annotations/editors/highlight-editor.js +717 -0
- package/dist/npm/annotations/editors/outliner.d.ts +51 -0
- package/dist/npm/annotations/editors/outliner.js +750 -0
- package/dist/npm/annotations/helpers/annotation-storage.d.ts +98 -0
- package/dist/npm/annotations/helpers/annotation-storage.js +299 -0
- package/dist/npm/annotations/helpers/color-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/color-manager.js +76 -0
- package/dist/npm/annotations/helpers/command-manager.d.ts +42 -0
- package/dist/npm/annotations/helpers/command-manager.js +137 -0
- package/dist/npm/annotations/helpers/id-manager.d.ts +6 -0
- package/dist/npm/annotations/helpers/id-manager.js +38 -0
- package/dist/npm/annotations/helpers/image-manager.d.ts +18 -0
- package/dist/npm/annotations/helpers/image-manager.js +180 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.d.ts +36 -0
- package/dist/npm/annotations/helpers/text-accessibility-manager.js +215 -0
- package/dist/npm/annotations/helpers/tools.d.ts +1 -0
- package/dist/npm/annotations/helpers/tools.js +23 -0
- package/dist/npm/annotations/shared/display_utils.d.ts +6 -0
- package/dist/npm/annotations/shared/display_utils.js +1030 -0
- package/dist/npm/annotations/shared/event_utils.d.ts +33 -0
- package/dist/npm/annotations/shared/event_utils.js +165 -0
- package/dist/npm/annotations/shared/murmurhash3.d.ts +8 -0
- package/dist/npm/annotations/shared/murmurhash3.js +129 -0
- package/dist/npm/annotations/shared/scripting_utils.d.ts +17 -0
- package/dist/npm/annotations/shared/scripting_utils.js +93 -0
- package/dist/npm/annotations/shared/ui_utils.d.ts +54 -0
- package/dist/npm/annotations/shared/ui_utils.js +250 -0
- package/dist/npm/annotations/shared/utils.d.ts +148 -0
- package/dist/npm/annotations/shared/utils.js +872 -0
- package/dist/npm/common/component.d.ts +9 -0
- package/dist/npm/common/component.js +37 -0
- package/dist/npm/common/core.d.ts +18 -0
- package/dist/npm/common/core.js +112 -0
- package/dist/npm/common/dom.d.ts +3 -0
- package/dist/npm/common/dom.js +17 -0
- package/dist/npm/common/main.d.ts +4 -0
- package/dist/npm/common/main.js +7 -0
- package/dist/npm/common/math.d.ts +1 -0
- package/dist/npm/common/math.js +5 -0
- package/dist/npm/enums/PdfViewerInteractionMode.d.ts +4 -0
- package/dist/npm/enums/PdfViewerInteractionMode.js +9 -0
- package/dist/npm/links/link-service.d.ts +116 -0
- package/dist/npm/links/link-service.js +501 -0
- package/dist/npm/main.d.ts +2 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/scroller.d.ts +7 -3
- package/dist/npm/scroller.js +32 -32
- package/dist/npm/text/text-layer-builder.d.ts +30 -0
- package/dist/npm/text/text-layer-builder.js +291 -0
- package/dist/npm/utils.d.ts +20 -2
- package/dist/npm/utils.js +11 -8
- package/dist/npm/widget/page.d.ts +75 -0
- package/dist/npm/widget/page.js +763 -0
- package/dist/npm/widget/pdfviewer.d.ts +222 -0
- package/dist/npm/widget/pdfviewer.js +1663 -0
- package/package.json +13 -9
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Copyright 2012 Mozilla Foundation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TextLayerMode = exports.ScrollMode = exports.scrollIntoView = exports.RenderingStates = exports.PresentationModeState = exports.parseQueryString = exports.DEFAULT_SCALE = exports.binarySearchFirstItem = void 0;
|
|
18
|
+
// const DEFAULT_SCALE_VALUE = "auto";
|
|
19
|
+
const DEFAULT_SCALE = 1.0;
|
|
20
|
+
exports.DEFAULT_SCALE = DEFAULT_SCALE;
|
|
21
|
+
// const DEFAULT_SCALE_DELTA = 1.1;
|
|
22
|
+
// const MIN_SCALE = 0.1;
|
|
23
|
+
// const MAX_SCALE = 10.0;
|
|
24
|
+
// const UNKNOWN_SCALE = 0;
|
|
25
|
+
// const MAX_AUTO_SCALE = 1.25;
|
|
26
|
+
// const SCROLLBAR_PADDING = 40;
|
|
27
|
+
// const VERTICAL_PADDING = 5;
|
|
28
|
+
const RenderingStates = {
|
|
29
|
+
INITIAL: 0,
|
|
30
|
+
RUNNING: 1,
|
|
31
|
+
PAUSED: 2,
|
|
32
|
+
FINISHED: 3,
|
|
33
|
+
};
|
|
34
|
+
exports.RenderingStates = RenderingStates;
|
|
35
|
+
const PresentationModeState = {
|
|
36
|
+
UNKNOWN: 0,
|
|
37
|
+
NORMAL: 1,
|
|
38
|
+
CHANGING: 2,
|
|
39
|
+
FULLSCREEN: 3,
|
|
40
|
+
};
|
|
41
|
+
exports.PresentationModeState = PresentationModeState;
|
|
42
|
+
// const SidebarView = {
|
|
43
|
+
// UNKNOWN: -1,
|
|
44
|
+
// NONE: 0,
|
|
45
|
+
// THUMBS: 1, // Default value.
|
|
46
|
+
// OUTLINE: 2,
|
|
47
|
+
// ATTACHMENTS: 3,
|
|
48
|
+
// LAYERS: 4,
|
|
49
|
+
// };
|
|
50
|
+
const TextLayerMode = {
|
|
51
|
+
DISABLE: 0,
|
|
52
|
+
ENABLE: 1,
|
|
53
|
+
ENABLE_PERMISSIONS: 2,
|
|
54
|
+
};
|
|
55
|
+
exports.TextLayerMode = TextLayerMode;
|
|
56
|
+
const ScrollMode = {
|
|
57
|
+
UNKNOWN: -1,
|
|
58
|
+
VERTICAL: 0, // Default value.
|
|
59
|
+
HORIZONTAL: 1,
|
|
60
|
+
WRAPPED: 2,
|
|
61
|
+
PAGE: 3,
|
|
62
|
+
};
|
|
63
|
+
exports.ScrollMode = ScrollMode;
|
|
64
|
+
// const SpreadMode = {
|
|
65
|
+
// UNKNOWN: -1,
|
|
66
|
+
// NONE: 0, // Default value.
|
|
67
|
+
// ODD: 1,
|
|
68
|
+
// EVEN: 2,
|
|
69
|
+
// };
|
|
70
|
+
// const CursorTool = {
|
|
71
|
+
// SELECT: 0, // The default value.
|
|
72
|
+
// HAND: 1,
|
|
73
|
+
// ZOOM: 2,
|
|
74
|
+
// };
|
|
75
|
+
// // Used by `PDFViewerApplication`, and by the API unit-tests.
|
|
76
|
+
// const AutoPrintRegExp = /\bprint\s*\(/;
|
|
77
|
+
// /**
|
|
78
|
+
// * Scale factors for the canvas, necessary with HiDPI displays.
|
|
79
|
+
// */
|
|
80
|
+
// class OutputScale {
|
|
81
|
+
// constructor() {
|
|
82
|
+
// const pixelRatio = window.devicePixelRatio || 1;
|
|
83
|
+
// /**
|
|
84
|
+
// * @type {number} Horizontal scale.
|
|
85
|
+
// */
|
|
86
|
+
// this.sx = pixelRatio;
|
|
87
|
+
// /**
|
|
88
|
+
// * @type {number} Vertical scale.
|
|
89
|
+
// */
|
|
90
|
+
// this.sy = pixelRatio;
|
|
91
|
+
// }
|
|
92
|
+
// /**
|
|
93
|
+
// * @type {boolean} Returns `true` when scaling is required, `false` otherwise.
|
|
94
|
+
// */
|
|
95
|
+
// get scaled() {
|
|
96
|
+
// return this.sx !== 1 || this.sy !== 1;
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
99
|
+
/**
|
|
100
|
+
* Scrolls specified element into view of its parent.
|
|
101
|
+
* @param {HTMLElement} element - The element to be visible.
|
|
102
|
+
* @param {Object} [spot] - An object with optional top and left properties,
|
|
103
|
+
* specifying the offset from the top left edge.
|
|
104
|
+
* @param {number} [spot.left]
|
|
105
|
+
* @param {number} [spot.top]
|
|
106
|
+
* @param {boolean} [scrollMatches] - When scrolling search results into view,
|
|
107
|
+
* ignore elements that either: Contains marked content identifiers,
|
|
108
|
+
* or have the CSS-rule `overflow: hidden;` set. The default value is `false`.
|
|
109
|
+
*/
|
|
110
|
+
function scrollIntoView(element, spot, scrollMatches = false) {
|
|
111
|
+
// Assuming offsetParent is available (it's not available when viewer is in
|
|
112
|
+
// hidden iframe or object). We have to scroll: if the offsetParent is not set
|
|
113
|
+
// producing the error. See also animationStarted.
|
|
114
|
+
let parent = element.offsetParent;
|
|
115
|
+
if (!parent) {
|
|
116
|
+
console.error("offsetParent is not set -- cannot scroll");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let offsetY = element.offsetTop + element.clientTop;
|
|
120
|
+
let offsetX = element.offsetLeft + element.clientLeft;
|
|
121
|
+
while ((parent.clientHeight === parent.scrollHeight &&
|
|
122
|
+
parent.clientWidth === parent.scrollWidth) ||
|
|
123
|
+
(scrollMatches &&
|
|
124
|
+
(parent.classList.contains("markedContent") || parent.classList.contains("k-marked-content") ||
|
|
125
|
+
getComputedStyle(parent).overflow === "hidden"))) {
|
|
126
|
+
offsetY += parent.offsetTop;
|
|
127
|
+
offsetX += parent.offsetLeft;
|
|
128
|
+
parent = parent.offsetParent;
|
|
129
|
+
if (!parent) {
|
|
130
|
+
return; // no need to scroll
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (spot) {
|
|
134
|
+
if (spot.top !== undefined) {
|
|
135
|
+
offsetY += spot.top;
|
|
136
|
+
}
|
|
137
|
+
if (spot.left !== undefined) {
|
|
138
|
+
offsetX += spot.left;
|
|
139
|
+
parent.scrollLeft = offsetX;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
parent.scrollTop = offsetY;
|
|
143
|
+
}
|
|
144
|
+
exports.scrollIntoView = scrollIntoView;
|
|
145
|
+
// /**
|
|
146
|
+
// * Helper function to start monitoring the scroll event and converting them into
|
|
147
|
+
// * PDF.js friendly one: with scroll debounce and scroll direction.
|
|
148
|
+
// */
|
|
149
|
+
// function watchScroll(viewAreaElement, callback, abortSignal = undefined) {
|
|
150
|
+
// const debounceScroll = function (evt) {
|
|
151
|
+
// if (rAF) {
|
|
152
|
+
// return;
|
|
153
|
+
// }
|
|
154
|
+
// // schedule an invocation of scroll for next animation frame.
|
|
155
|
+
// rAF = window.requestAnimationFrame(function viewAreaElementScrolled() {
|
|
156
|
+
// rAF = null;
|
|
157
|
+
// const currentX = viewAreaElement.scrollLeft;
|
|
158
|
+
// const lastX = state.lastX;
|
|
159
|
+
// if (currentX !== lastX) {
|
|
160
|
+
// state.right = currentX > lastX;
|
|
161
|
+
// }
|
|
162
|
+
// state.lastX = currentX;
|
|
163
|
+
// const currentY = viewAreaElement.scrollTop;
|
|
164
|
+
// const lastY = state.lastY;
|
|
165
|
+
// if (currentY !== lastY) {
|
|
166
|
+
// state.down = currentY > lastY;
|
|
167
|
+
// }
|
|
168
|
+
// state.lastY = currentY;
|
|
169
|
+
// callback(state);
|
|
170
|
+
// });
|
|
171
|
+
// };
|
|
172
|
+
// const state = {
|
|
173
|
+
// right: true,
|
|
174
|
+
// down: true,
|
|
175
|
+
// lastX: viewAreaElement.scrollLeft,
|
|
176
|
+
// lastY: viewAreaElement.scrollTop,
|
|
177
|
+
// _eventHandler: debounceScroll,
|
|
178
|
+
// };
|
|
179
|
+
// let rAF = null;
|
|
180
|
+
// viewAreaElement.addEventListener("scroll", debounceScroll, {
|
|
181
|
+
// useCapture: true,
|
|
182
|
+
// signal: abortSignal,
|
|
183
|
+
// });
|
|
184
|
+
// abortSignal?.addEventListener(
|
|
185
|
+
// "abort",
|
|
186
|
+
// () => window.cancelAnimationFrame(rAF),
|
|
187
|
+
// { once: true }
|
|
188
|
+
// );
|
|
189
|
+
// return state;
|
|
190
|
+
// }
|
|
191
|
+
/**
|
|
192
|
+
* Helper function to parse query string (e.g. ?param1=value¶m2=...).
|
|
193
|
+
* @param {string} query
|
|
194
|
+
* @returns {Map}
|
|
195
|
+
*/
|
|
196
|
+
function parseQueryString(query) {
|
|
197
|
+
const params = new Map();
|
|
198
|
+
const urlSearchParams = new URLSearchParams(query);
|
|
199
|
+
for (const [key, value] of urlSearchParams) {
|
|
200
|
+
// for (const [key, value] of new URLSearchParams(query)) {
|
|
201
|
+
params.set(key.toLowerCase(), value);
|
|
202
|
+
}
|
|
203
|
+
return params;
|
|
204
|
+
}
|
|
205
|
+
exports.parseQueryString = parseQueryString;
|
|
206
|
+
// const InvisibleCharsRegExp = /[\x00-\x1F]/g;
|
|
207
|
+
// /**
|
|
208
|
+
// * @param {string} str
|
|
209
|
+
// * @param {boolean} [replaceInvisible]
|
|
210
|
+
// */
|
|
211
|
+
// function removeNullCharacters(str, replaceInvisible = false) {
|
|
212
|
+
// if (!InvisibleCharsRegExp.test(str)) {
|
|
213
|
+
// return str;
|
|
214
|
+
// }
|
|
215
|
+
// if (replaceInvisible) {
|
|
216
|
+
// return str.replaceAll(InvisibleCharsRegExp, m => (m === "\x00" ? "" : " "));
|
|
217
|
+
// }
|
|
218
|
+
// return str.replaceAll("\x00", "");
|
|
219
|
+
// }
|
|
220
|
+
/**
|
|
221
|
+
* Use binary search to find the index of the first item in a given array which
|
|
222
|
+
* passes a given condition. The items are expected to be sorted in the sense
|
|
223
|
+
* that if the condition is true for one item in the array, then it is also true
|
|
224
|
+
* for all following items.
|
|
225
|
+
*
|
|
226
|
+
* @returns {number} Index of the first array element to pass the test,
|
|
227
|
+
* or |items.length| if no such element exists.
|
|
228
|
+
*/
|
|
229
|
+
function binarySearchFirstItem(items, condition, start = 0) {
|
|
230
|
+
let minIndex = start;
|
|
231
|
+
let maxIndex = items.length - 1;
|
|
232
|
+
if (maxIndex < 0 || !condition(items[maxIndex])) {
|
|
233
|
+
return items.length;
|
|
234
|
+
}
|
|
235
|
+
if (condition(items[minIndex])) {
|
|
236
|
+
return minIndex;
|
|
237
|
+
}
|
|
238
|
+
while (minIndex < maxIndex) {
|
|
239
|
+
const currentIndex = (minIndex + maxIndex) >> 1;
|
|
240
|
+
const currentItem = items[currentIndex];
|
|
241
|
+
if (condition(currentItem)) {
|
|
242
|
+
maxIndex = currentIndex;
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
minIndex = currentIndex + 1;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return minIndex; /* === maxIndex */
|
|
249
|
+
}
|
|
250
|
+
exports.binarySearchFirstItem = binarySearchFirstItem;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
declare const LINE_FACTOR = 1.35;
|
|
2
|
+
declare const LINE_DESCENT_FACTOR = 0.35;
|
|
3
|
+
declare const BASELINE_FACTOR: number;
|
|
4
|
+
/**
|
|
5
|
+
* Refer to the `WorkerTransport.getRenderingIntent`-method in the API, to see
|
|
6
|
+
* how these flags are being used:
|
|
7
|
+
* - ANY, DISPLAY, and PRINT are the normal rendering intents, note the
|
|
8
|
+
* `PDFPageProxy.{render, getOperatorList, getAnnotations}`-methods.
|
|
9
|
+
* - SAVE is used, on the worker-thread, when saving modified annotations.
|
|
10
|
+
* - ANNOTATIONS_FORMS, ANNOTATIONS_STORAGE, ANNOTATIONS_DISABLE control which
|
|
11
|
+
* annotations are rendered onto the canvas (i.e. by being included in the
|
|
12
|
+
* operatorList), note the `PDFPageProxy.{render, getOperatorList}`-methods
|
|
13
|
+
* and their `annotationMode`-option.
|
|
14
|
+
* - IS_EDITING is used when editing is active in the viewer.
|
|
15
|
+
* - OPLIST is used with the `PDFPageProxy.getOperatorList`-method, note the
|
|
16
|
+
* `OperatorList`-constructor (on the worker-thread).
|
|
17
|
+
*/
|
|
18
|
+
declare const AnnotationMode: {
|
|
19
|
+
DISABLE: number;
|
|
20
|
+
ENABLE: number;
|
|
21
|
+
ENABLE_FORMS: number;
|
|
22
|
+
ENABLE_STORAGE: number;
|
|
23
|
+
};
|
|
24
|
+
declare const AnnotationEditorPrefix = "pdfjs_internal_editor_";
|
|
25
|
+
declare const AnnotationEditorType: {
|
|
26
|
+
DISABLE: number;
|
|
27
|
+
NONE: number;
|
|
28
|
+
FREETEXT: number;
|
|
29
|
+
HIGHLIGHT: number;
|
|
30
|
+
STAMP: number;
|
|
31
|
+
INK: number;
|
|
32
|
+
};
|
|
33
|
+
declare const AnnotationEditorParamsType: {
|
|
34
|
+
RESIZE: number;
|
|
35
|
+
CREATE: number;
|
|
36
|
+
FREETEXT_SIZE: number;
|
|
37
|
+
FREETEXT_COLOR: number;
|
|
38
|
+
FREETEXT_OPACITY: number;
|
|
39
|
+
INK_COLOR: number;
|
|
40
|
+
INK_THICKNESS: number;
|
|
41
|
+
INK_OPACITY: number;
|
|
42
|
+
HIGHLIGHT_COLOR: number;
|
|
43
|
+
HIGHLIGHT_DEFAULT_COLOR: number;
|
|
44
|
+
HIGHLIGHT_THICKNESS: number;
|
|
45
|
+
HIGHLIGHT_FREE: number;
|
|
46
|
+
HIGHLIGHT_SHOW_ALL: number;
|
|
47
|
+
};
|
|
48
|
+
declare const AnnotationType: {
|
|
49
|
+
TEXT: number;
|
|
50
|
+
LINK: number;
|
|
51
|
+
FREETEXT: number;
|
|
52
|
+
LINE: number;
|
|
53
|
+
SQUARE: number;
|
|
54
|
+
CIRCLE: number;
|
|
55
|
+
POLYGON: number;
|
|
56
|
+
POLYLINE: number;
|
|
57
|
+
HIGHLIGHT: number;
|
|
58
|
+
UNDERLINE: number;
|
|
59
|
+
SQUIGGLY: number;
|
|
60
|
+
STRIKEOUT: number;
|
|
61
|
+
STAMP: number;
|
|
62
|
+
CARET: number;
|
|
63
|
+
INK: number;
|
|
64
|
+
POPUP: number;
|
|
65
|
+
FILEATTACHMENT: number;
|
|
66
|
+
SOUND: number;
|
|
67
|
+
MOVIE: number;
|
|
68
|
+
WIDGET: number;
|
|
69
|
+
SCREEN: number;
|
|
70
|
+
PRINTERMARK: number;
|
|
71
|
+
TRAPNET: number;
|
|
72
|
+
WATERMARK: number;
|
|
73
|
+
THREED: number;
|
|
74
|
+
REDACT: number;
|
|
75
|
+
};
|
|
76
|
+
declare const AnnotationReplyType: {
|
|
77
|
+
GROUP: string;
|
|
78
|
+
REPLY: string;
|
|
79
|
+
};
|
|
80
|
+
declare const AnnotationFlag: {
|
|
81
|
+
INVISIBLE: number;
|
|
82
|
+
HIDDEN: number;
|
|
83
|
+
PRINT: number;
|
|
84
|
+
NOZOOM: number;
|
|
85
|
+
NOROTATE: number;
|
|
86
|
+
NOVIEW: number;
|
|
87
|
+
READONLY: number;
|
|
88
|
+
LOCKED: number;
|
|
89
|
+
TOGGLENOVIEW: number;
|
|
90
|
+
LOCKEDCONTENTS: number;
|
|
91
|
+
};
|
|
92
|
+
declare const AnnotationFieldFlag: {
|
|
93
|
+
READONLY: number;
|
|
94
|
+
REQUIRED: number;
|
|
95
|
+
NOEXPORT: number;
|
|
96
|
+
MULTILINE: number;
|
|
97
|
+
PASSWORD: number;
|
|
98
|
+
NOTOGGLETOOFF: number;
|
|
99
|
+
RADIO: number;
|
|
100
|
+
PUSHBUTTON: number;
|
|
101
|
+
COMBO: number;
|
|
102
|
+
EDIT: number;
|
|
103
|
+
SORT: number;
|
|
104
|
+
FILESELECT: number;
|
|
105
|
+
MULTISELECT: number;
|
|
106
|
+
DONOTSPELLCHECK: number;
|
|
107
|
+
DONOTSCROLL: number;
|
|
108
|
+
COMB: number;
|
|
109
|
+
RICHTEXT: number;
|
|
110
|
+
RADIOSINUNISON: number;
|
|
111
|
+
COMMITONSELCHANGE: number;
|
|
112
|
+
};
|
|
113
|
+
declare const AnnotationBorderStyleType: {
|
|
114
|
+
SOLID: number;
|
|
115
|
+
DASHED: number;
|
|
116
|
+
BEVELED: number;
|
|
117
|
+
INSET: number;
|
|
118
|
+
UNDERLINE: number;
|
|
119
|
+
};
|
|
120
|
+
declare const AnnotationActionEventType: {
|
|
121
|
+
E: string;
|
|
122
|
+
X: string;
|
|
123
|
+
D: string;
|
|
124
|
+
U: string;
|
|
125
|
+
Fo: string;
|
|
126
|
+
Bl: string;
|
|
127
|
+
PO: string;
|
|
128
|
+
PC: string;
|
|
129
|
+
PV: string;
|
|
130
|
+
PI: string;
|
|
131
|
+
K: string;
|
|
132
|
+
F: string;
|
|
133
|
+
V: string;
|
|
134
|
+
C: string;
|
|
135
|
+
};
|
|
136
|
+
declare function shadow(obj: any, prop: any, value: any, nonSerializable?: boolean): any;
|
|
137
|
+
declare function bytesToString(bytes: any): any;
|
|
138
|
+
declare function objectFromMap(map: any): any;
|
|
139
|
+
declare class FeatureTest {
|
|
140
|
+
static get isCSSRoundSupported(): any;
|
|
141
|
+
}
|
|
142
|
+
declare class Util {
|
|
143
|
+
static makeHexColor(r: any, g: any, b: any): string;
|
|
144
|
+
static normalizeRect(rect: any): any;
|
|
145
|
+
}
|
|
146
|
+
declare function getUuid(): any;
|
|
147
|
+
declare const AnnotationPrefix = "pdfjs_internal_id_";
|
|
148
|
+
export { AnnotationActionEventType, AnnotationBorderStyleType, AnnotationEditorParamsType, AnnotationEditorPrefix, AnnotationEditorType, AnnotationFieldFlag, AnnotationFlag, AnnotationMode, AnnotationPrefix, AnnotationReplyType, AnnotationType, BASELINE_FACTOR, bytesToString, FeatureTest, getUuid, LINE_DESCENT_FACTOR, LINE_FACTOR, objectFromMap, shadow, Util };
|