@chialab/pdfjs-lib 1.0.0-alpha.2 → 1.0.0-alpha.20
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/README.md +15 -7
- package/dist/browser/NodeCanvasFactory-ONRE5YYL.js +58 -0
- package/dist/browser/chunk-5IWODJWD.js +801 -0
- package/dist/browser/chunk-ELOUEWKT.js +1142 -0
- package/dist/browser/chunk-NJUB3B5A.js +1207 -0
- package/dist/browser/index.js +2641 -3053
- package/dist/browser/openjpeg-K2XBCFFN.js +9 -0
- package/dist/browser/qcms_bg-Q7BRLLZG.js +9 -0
- package/dist/browser/worker.js +7307 -6457
- package/dist/index.d.ts +3 -0
- package/dist/lib/AnnotationData.d.ts +8 -8
- package/dist/lib/AnnotationOperatorsList.d.ts +21 -0
- package/dist/lib/CanvasGraphics.d.ts +1 -0
- package/dist/lib/NodeCanvasFactory.d.ts +9 -0
- package/dist/lib/NodeFilterFactory.d.ts +10 -0
- package/dist/lib/Path2D.d.ts +1 -1
- package/dist/lib/StandardFontDataFactory.d.ts +2 -2
- package/dist/lib/Svg.d.ts +143 -0
- package/dist/lib/SvgCanvasContext.d.ts +31 -22
- package/dist/lib/TextLayer.d.ts +12 -5
- package/dist/lib/WasmFactory.d.ts +5 -0
- package/dist/lib/utils.d.ts +29 -3
- package/dist/node/NodeCanvasFactory-YRBSQ5MH.js +8 -0
- package/dist/node/chunk-3XZOTLLE.js +1439 -0
- package/dist/node/chunk-XMKSLA4K.js +1207 -0
- package/dist/node/chunk-ZKUTXCS2.js +801 -0
- package/dist/node/index.js +2659 -3102
- package/dist/node/openjpeg-B2WN24QZ.js +9 -0
- package/dist/node/qcms_bg-T4RSHPOQ.js +9 -0
- package/dist/node/worker.js +7307 -6457
- package/dist/pdf.js/src/display/annotation_layer.d.ts +1 -2
- package/dist/pdf.js/src/display/annotation_storage.d.ts +1 -8
- package/dist/pdf.js/src/display/api.d.ts +38 -72
- package/dist/pdf.js/src/display/api_utils.d.ts +13 -0
- package/dist/pdf.js/src/display/canvas.d.ts +21 -29
- package/dist/pdf.js/src/display/display_utils.d.ts +12 -1
- package/dist/pdf.js/src/display/draw_layer.d.ts +2 -2
- package/dist/pdf.js/src/display/editor/alt_text.d.ts +1 -1
- package/dist/pdf.js/src/display/editor/annotation_editor_layer.d.ts +5 -5
- package/dist/pdf.js/src/display/editor/color_picker.d.ts +1 -1
- package/dist/pdf.js/src/display/editor/draw.d.ts +7 -7
- package/dist/pdf.js/src/display/editor/drawers/freedraw.d.ts +3 -3
- package/dist/pdf.js/src/display/editor/drawers/signaturedraw.d.ts +13 -13
- package/dist/pdf.js/src/display/editor/editor.d.ts +30 -6
- package/dist/pdf.js/src/display/editor/freetext.d.ts +4 -7
- package/dist/pdf.js/src/display/editor/highlight.d.ts +6 -3
- package/dist/pdf.js/src/display/editor/ink.d.ts +1 -0
- package/dist/pdf.js/src/display/editor/signature.d.ts +3 -0
- package/dist/pdf.js/src/display/editor/stamp.d.ts +4 -3
- package/dist/pdf.js/src/display/editor/toolbar.d.ts +4 -2
- package/dist/pdf.js/src/display/editor/tools.d.ts +7 -9
- package/dist/pdf.js/src/display/metadata.d.ts +1 -2
- package/dist/pdf.js/src/display/optional_content_config.d.ts +1 -1
- package/dist/pdf.js/src/display/pattern_helper.d.ts +4 -2
- package/dist/pdf.js/src/display/pdf_objects.d.ts +40 -0
- package/dist/pdf.js/src/display/text_layer.d.ts +9 -9
- package/dist/pdf.js/src/display/touch_manager.d.ts +5 -1
- package/dist/pdf.js/src/display/worker_options.d.ts +2 -2
- package/dist/pdf.js/src/pdf.d.ts +4 -1
- package/dist/pdf.js/src/shared/scripting_utils.d.ts +2 -0
- package/dist/pdf.js/src/shared/util.d.ts +123 -100
- package/dist/pdf.js/web/text_accessibility.d.ts +1 -1
- package/package.json +7 -4
- package/dist/browser/chunk-DYHYQ33L.js +0 -1775
- package/dist/node/chunk-KTTVPO2G.js +0 -1775
- package/dist/pdf.js/src/display/cmap_reader_factory.d.ts +0 -25
- package/dist/pdf.js/src/display/node_utils.d.ts +0 -32
- package/dist/pdf.js/src/display/wasm_factory.d.ts +0 -20
|
@@ -19,18 +19,19 @@ export class HighlightEditor extends AnnotationEditor {
|
|
|
19
19
|
/** @inheritdoc */
|
|
20
20
|
static updateDefaultParams(type: any, value: any): void;
|
|
21
21
|
static get defaultPropertiesToUpdate(): (number | null)[][];
|
|
22
|
-
static
|
|
22
|
+
static #rotateBbox([x, y, width, height]: [any, any, any, any], angle: any): any[];
|
|
23
23
|
static startHighlighting(parent: any, isLTR: any, { target: textLayer, x, y }: {
|
|
24
24
|
target: any;
|
|
25
25
|
x: any;
|
|
26
26
|
y: any;
|
|
27
27
|
}): void;
|
|
28
|
-
static
|
|
29
|
-
static
|
|
28
|
+
static #highlightMove(parent: any, event: any): void;
|
|
29
|
+
static #endHighlight(parent: any, event: any): void;
|
|
30
30
|
/** @inheritdoc */
|
|
31
31
|
static deserialize(data: any, parent: any, uiManager: any): Promise<AnnotationEditor | null>;
|
|
32
32
|
constructor(params: any);
|
|
33
33
|
color: any;
|
|
34
|
+
defaultL10nId: string;
|
|
34
35
|
/** @inheritdoc */
|
|
35
36
|
get telemetryInitialData(): {
|
|
36
37
|
action: string;
|
|
@@ -51,6 +52,8 @@ export class HighlightEditor extends AnnotationEditor {
|
|
|
51
52
|
/** @inheritdoc */
|
|
52
53
|
get propertiesToUpdate(): any[][];
|
|
53
54
|
/** @inheritdoc */
|
|
55
|
+
get toolbarButtons(): any;
|
|
56
|
+
/** @inheritdoc */
|
|
54
57
|
fixAndSetPosition(): void;
|
|
55
58
|
/** @inheritdoc */
|
|
56
59
|
getRect(tx: any, ty: any): any[];
|
|
@@ -20,6 +20,7 @@ export class InkEditor extends DrawingEditor {
|
|
|
20
20
|
static createDrawerInstance(x: any, y: any, parentWidth: any, parentHeight: any, rotation: any): InkDrawOutliner;
|
|
21
21
|
/** @inheritdoc */
|
|
22
22
|
static deserializeDraw(pageX: any, pageY: any, pageWidth: any, pageHeight: any, innerMargin: any, data: any): any;
|
|
23
|
+
defaultL10nId: string;
|
|
23
24
|
/** @inheritdoc */
|
|
24
25
|
createDrawingOptions({ color, thickness, opacity }: {
|
|
25
26
|
color: any;
|
|
@@ -17,6 +17,7 @@ export class SignatureEditor extends DrawingEditor {
|
|
|
17
17
|
};
|
|
18
18
|
/** @inheritdoc */
|
|
19
19
|
static deserializeDraw(pageX: any, pageY: any, pageWidth: any, pageHeight: any, innerMargin: any, data: any): any;
|
|
20
|
+
defaultL10nId: string;
|
|
20
21
|
/** @inheritdoc */
|
|
21
22
|
get telemetryFinalData(): {
|
|
22
23
|
type: string;
|
|
@@ -30,6 +31,8 @@ export class SignatureEditor extends DrawingEditor {
|
|
|
30
31
|
areContours: any;
|
|
31
32
|
outline: InkDrawOutline;
|
|
32
33
|
};
|
|
34
|
+
/** @inheritdoc */
|
|
35
|
+
get toolbarButtons(): any[][] | null;
|
|
33
36
|
addSignature(data: any, heightInPage: any, description: any, uuid: any): void;
|
|
34
37
|
getFromImage(bitmap: any): {
|
|
35
38
|
outline: InkDrawOutline;
|
|
@@ -17,6 +17,7 @@ export class StampEditor extends AnnotationEditor {
|
|
|
17
17
|
/** @inheritdoc */
|
|
18
18
|
static deserialize(data: any, parent: any, uiManager: any): Promise<AnnotationEditor | null>;
|
|
19
19
|
constructor(params: any);
|
|
20
|
+
defaultL10nId: string;
|
|
20
21
|
/** @inheritdoc */
|
|
21
22
|
get telemetryFinalData(): {
|
|
22
23
|
type: string;
|
|
@@ -25,6 +26,8 @@ export class StampEditor extends AnnotationEditor {
|
|
|
25
26
|
mlGuessAltText(imageData?: null, updateAltTextData?: boolean): Promise<any>;
|
|
26
27
|
/** @inheritdoc */
|
|
27
28
|
onceAdded(focus: any): void;
|
|
29
|
+
/** @inheritdoc */
|
|
30
|
+
get toolbarButtons(): (string | object)[][];
|
|
28
31
|
setCanvas(annotationElementId: any, canvas: any): void;
|
|
29
32
|
onScaleChanging(): void;
|
|
30
33
|
copyCanvas(maxDataDimension: any, maxPreviewDimension: any, createImageData?: boolean): {
|
|
@@ -34,12 +37,10 @@ export class StampEditor extends AnnotationEditor {
|
|
|
34
37
|
imageData: {
|
|
35
38
|
width: any;
|
|
36
39
|
height: any;
|
|
37
|
-
data:
|
|
40
|
+
data: ImageDataArray;
|
|
38
41
|
} | null;
|
|
39
42
|
};
|
|
40
43
|
/** @inheritdoc */
|
|
41
|
-
getImageForAltText(): null;
|
|
42
|
-
/** @inheritdoc */
|
|
43
44
|
serialize(isForCopying?: boolean, context?: null): Object | null;
|
|
44
45
|
/** @inheritdoc */
|
|
45
46
|
renderAnnotationElement(annotation: any): null;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export class EditorToolbar {
|
|
2
|
-
static
|
|
3
|
-
static
|
|
2
|
+
static #l10nRemove: null;
|
|
3
|
+
static #pointerDown(e: any): void;
|
|
4
4
|
constructor(editor: any);
|
|
5
5
|
render(): HTMLDivElement;
|
|
6
6
|
get div(): null;
|
|
7
7
|
hide(): void;
|
|
8
8
|
show(): void;
|
|
9
|
+
addDeleteButton(): void;
|
|
9
10
|
addAltText(altText: any): Promise<void>;
|
|
10
11
|
addColorPicker(colorPicker: any): void;
|
|
11
12
|
addEditSignatureButton(signatureManager: any): Promise<void>;
|
|
13
|
+
addButton(name: any, tool: any): Promise<void>;
|
|
12
14
|
updateEditSignatureButton(description: any): void;
|
|
13
15
|
remove(): void;
|
|
14
16
|
#private;
|
|
@@ -12,7 +12,7 @@ export class AnnotationEditorUIManager {
|
|
|
12
12
|
static TRANSLATE_SMALL: number;
|
|
13
13
|
static TRANSLATE_BIG: number;
|
|
14
14
|
static get _keyboardManager(): any;
|
|
15
|
-
constructor(container: any, viewer: any, altTextManager: any, signatureManager: any, eventBus: any, pdfDocument: any, pageColors: any, highlightColors: any, enableHighlightFloatingButton: any, enableUpdatedAddImage: any, enableNewAltTextWhenAddingImage: any, mlManager: any, editorUndoBar: any, supportsPinchToZoom: any);
|
|
15
|
+
constructor(container: any, viewer: any, viewerAlert: any, altTextManager: any, signatureManager: any, eventBus: any, pdfDocument: any, pageColors: any, highlightColors: any, enableHighlightFloatingButton: any, enableUpdatedAddImage: any, enableNewAltTextWhenAddingImage: any, mlManager: any, editorUndoBar: any, supportsPinchToZoom: any);
|
|
16
16
|
_editorUndoBar: null;
|
|
17
17
|
_signal: AbortSignal;
|
|
18
18
|
_eventBus: any;
|
|
@@ -66,6 +66,7 @@ export class AnnotationEditorUIManager {
|
|
|
66
66
|
* @param {AnnotationEditor} editor
|
|
67
67
|
*/
|
|
68
68
|
addToAnnotationStorage(editor: AnnotationEditor): void;
|
|
69
|
+
a11yAlert(messageId: any, args?: null): void;
|
|
69
70
|
blur(): void;
|
|
70
71
|
focus(): void;
|
|
71
72
|
addEditListeners(): void;
|
|
@@ -141,15 +142,18 @@ export class AnnotationEditorUIManager {
|
|
|
141
142
|
* @param {string|null} editId
|
|
142
143
|
* @param {boolean} [isFromKeyboard] - true if the mode change is due to a
|
|
143
144
|
* keyboard action.
|
|
145
|
+
* @param {boolean} [mustEnterInEditMode] - true if the editor must enter in
|
|
146
|
+
* edit mode.
|
|
144
147
|
*/
|
|
145
|
-
updateMode(mode: number, editId?: string | null, isFromKeyboard?: boolean): Promise<void>;
|
|
148
|
+
updateMode(mode: number, editId?: string | null, isFromKeyboard?: boolean, mustEnterInEditMode?: boolean): Promise<void>;
|
|
146
149
|
addNewEditorFromKeyboard(): void;
|
|
147
150
|
/**
|
|
148
151
|
* Update the toolbar if it's required to reflect the tool currently used.
|
|
152
|
+
* @param {Object} options
|
|
149
153
|
* @param {number} mode
|
|
150
154
|
* @returns {undefined}
|
|
151
155
|
*/
|
|
152
|
-
updateToolbar(
|
|
156
|
+
updateToolbar(options: Object): undefined;
|
|
153
157
|
/**
|
|
154
158
|
* Update a parameter in the current editor or globally.
|
|
155
159
|
* @param {number} type
|
|
@@ -416,9 +420,3 @@ export class KeyboardManager {
|
|
|
416
420
|
exec(self: Object, event: KeyboardEvent): void;
|
|
417
421
|
#private;
|
|
418
422
|
}
|
|
419
|
-
/**
|
|
420
|
-
* Convert a number between 0 and 100 into an hex number between 0 and 255.
|
|
421
|
-
* @param {number} opacity
|
|
422
|
-
* @return {string}
|
|
423
|
-
*/
|
|
424
|
-
export function opacityToHex(opacity: number): string;
|
|
@@ -6,7 +6,8 @@ export namespace PathType {
|
|
|
6
6
|
}
|
|
7
7
|
export class TilingPattern {
|
|
8
8
|
static MAX_PATTERN_SIZE: number;
|
|
9
|
-
constructor(IR: any,
|
|
9
|
+
constructor(IR: any, ctx: any, canvasGraphicsFactory: any, baseTransform: any);
|
|
10
|
+
color: any;
|
|
10
11
|
operatorList: any;
|
|
11
12
|
matrix: any;
|
|
12
13
|
bbox: any;
|
|
@@ -14,7 +15,6 @@ export class TilingPattern {
|
|
|
14
15
|
ystep: any;
|
|
15
16
|
paintType: any;
|
|
16
17
|
tilingType: any;
|
|
17
|
-
color: any;
|
|
18
18
|
ctx: any;
|
|
19
19
|
canvasGraphicsFactory: any;
|
|
20
20
|
baseTransform: any;
|
|
@@ -31,6 +31,7 @@ export class TilingPattern {
|
|
|
31
31
|
};
|
|
32
32
|
clipBbox(graphics: any, x0: any, y0: any, x1: any, y1: any): void;
|
|
33
33
|
setFillAndStrokeStyleToContext(graphics: any, paintType: any, color: any): void;
|
|
34
|
+
isModifyingCurrentTransform(): boolean;
|
|
34
35
|
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
35
36
|
}
|
|
36
37
|
declare class RadialAxialShadingPattern extends BaseShadingPattern {
|
|
@@ -68,6 +69,7 @@ declare class DummyShadingPattern extends BaseShadingPattern {
|
|
|
68
69
|
getPattern(): string;
|
|
69
70
|
}
|
|
70
71
|
declare class BaseShadingPattern {
|
|
72
|
+
isModifyingCurrentTransform(): boolean;
|
|
71
73
|
getPattern(): void;
|
|
72
74
|
}
|
|
73
75
|
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A PDF document and page is built of many objects. E.g. there are objects for
|
|
3
|
+
* fonts, images, rendering code, etc. These objects may get processed inside of
|
|
4
|
+
* a worker. This class implements some basic methods to manage these objects.
|
|
5
|
+
*/
|
|
6
|
+
export class PDFObjects {
|
|
7
|
+
/**
|
|
8
|
+
* If called *without* callback, this returns the data of `objId` but the
|
|
9
|
+
* object needs to be resolved. If it isn't, this method throws.
|
|
10
|
+
*
|
|
11
|
+
* If called *with* a callback, the callback is called with the data of the
|
|
12
|
+
* object once the object is resolved. That means, if you call this method
|
|
13
|
+
* and the object is already resolved, the callback gets called right away.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} objId
|
|
16
|
+
* @param {function} [callback]
|
|
17
|
+
* @returns {any}
|
|
18
|
+
*/
|
|
19
|
+
get(objId: string, callback?: Function): any;
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} objId
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
has(objId: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} objId
|
|
27
|
+
* @returns {boolean}
|
|
28
|
+
*/
|
|
29
|
+
delete(objId: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Resolves the object `objId` with optional `data`.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} objId
|
|
34
|
+
* @param {any} [data]
|
|
35
|
+
*/
|
|
36
|
+
resolve(objId: string, data?: any): void;
|
|
37
|
+
clear(): void;
|
|
38
|
+
[Symbol.iterator](): Generator<any[], void, unknown>;
|
|
39
|
+
#private;
|
|
40
|
+
}
|
|
@@ -31,24 +31,24 @@ export type TextLayerUpdateParameters = {
|
|
|
31
31
|
onBefore?: Function | undefined;
|
|
32
32
|
};
|
|
33
33
|
export class TextLayer {
|
|
34
|
-
static
|
|
35
|
-
static
|
|
36
|
-
static
|
|
37
|
-
static
|
|
38
|
-
static
|
|
34
|
+
static #ascentCache: Map<any, any>;
|
|
35
|
+
static #canvasContexts: Map<any, any>;
|
|
36
|
+
static #canvasCtxFonts: WeakMap<WeakKey, any>;
|
|
37
|
+
static #minFontSize: null;
|
|
38
|
+
static #pendingTextLayers: Set<any>;
|
|
39
39
|
static get fontFamilyMap(): any;
|
|
40
40
|
/**
|
|
41
41
|
* Clean-up global textLayer data.
|
|
42
42
|
* @returns {undefined}
|
|
43
43
|
*/
|
|
44
44
|
static cleanup(): undefined;
|
|
45
|
-
static
|
|
46
|
-
static
|
|
45
|
+
static #getCtx(lang?: null): any;
|
|
46
|
+
static #ensureCtxFont(ctx: any, size: any, family: any): void;
|
|
47
47
|
/**
|
|
48
48
|
* Compute the minimum font size enforced by the browser.
|
|
49
49
|
*/
|
|
50
|
-
static
|
|
51
|
-
static
|
|
50
|
+
static #ensureMinFontSizeComputed(): void;
|
|
51
|
+
static #getAscent(fontFamily: any, style: any, lang: any): any;
|
|
52
52
|
/**
|
|
53
53
|
* @param {TextLayerParameters} options
|
|
54
54
|
*/
|
|
@@ -8,7 +8,11 @@ export class TouchManager {
|
|
|
8
8
|
onPinchEnd?: null | undefined;
|
|
9
9
|
signal: any;
|
|
10
10
|
});
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* NOTE: Don't shadow this value since `devicePixelRatio` may change if the
|
|
13
|
+
* window resolution changes, e.g. if the viewer is moved to another monitor.
|
|
14
|
+
*/
|
|
15
|
+
get MIN_TOUCH_DISTANCE_TO_PINCH(): number;
|
|
12
16
|
destroy(): void;
|
|
13
17
|
#private;
|
|
14
18
|
}
|
package/dist/pdf.js/src/pdf.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ import { ImageKind } from "./shared/util.js";
|
|
|
29
29
|
import { InvalidPDFException } from "./shared/util.js";
|
|
30
30
|
import { isDataScheme } from "./display/display_utils.js";
|
|
31
31
|
import { isPdfFile } from "./display/display_utils.js";
|
|
32
|
+
import { isValidExplicitDest } from "./display/api_utils.js";
|
|
33
|
+
import { MathClamp } from "./shared/util.js";
|
|
32
34
|
import { noContextMenu } from "./display/display_utils.js";
|
|
33
35
|
import { normalizeUnicode } from "./shared/util.js";
|
|
34
36
|
import { OPS } from "./shared/util.js";
|
|
@@ -48,8 +50,9 @@ import { stopEvent } from "./display/display_utils.js";
|
|
|
48
50
|
import { SupportedImageMimeTypes } from "./display/display_utils.js";
|
|
49
51
|
import { TextLayer } from "./display/text_layer.js";
|
|
50
52
|
import { TouchManager } from "./display/touch_manager.js";
|
|
53
|
+
import { updateUrlHash } from "./shared/util.js";
|
|
51
54
|
import { Util } from "./shared/util.js";
|
|
52
55
|
import { VerbosityLevel } from "./shared/util.js";
|
|
53
56
|
import { version } from "./display/api.js";
|
|
54
57
|
import { XfaLayer } from "./display/xfa_layer.js";
|
|
55
|
-
export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, AnnotationType, build, ColorPicker, createValidAbsoluteUrl, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getUuid, getXfaPageViewport, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, noContextMenu, normalizeUnicode, OPS, OutputScale, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, ResponseException, setLayerDimensions, shadow, SignatureExtractor, stopEvent, SupportedImageMimeTypes, TextLayer, TouchManager, Util, VerbosityLevel, version, XfaLayer };
|
|
58
|
+
export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, AnnotationType, build, ColorPicker, createValidAbsoluteUrl, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getUuid, getXfaPageViewport, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, isValidExplicitDest, MathClamp, noContextMenu, normalizeUnicode, OPS, OutputScale, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, ResponseException, setLayerDimensions, shadow, SignatureExtractor, stopEvent, SupportedImageMimeTypes, TextLayer, TouchManager, updateUrlHash, Util, VerbosityLevel, version, XfaLayer };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export function _isValidExplicitDest(validRef: any, validName: any, dest: any): boolean;
|
|
1
2
|
declare const AbortException_base: any;
|
|
2
3
|
/**
|
|
3
4
|
* Error used to indicate task cancellation.
|
|
@@ -157,6 +158,12 @@ export namespace DocumentActionEventType {
|
|
|
157
158
|
let WP: string;
|
|
158
159
|
let DP: string;
|
|
159
160
|
}
|
|
161
|
+
export namespace DrawOPS {
|
|
162
|
+
let moveTo: number;
|
|
163
|
+
let lineTo: number;
|
|
164
|
+
let curveTo: number;
|
|
165
|
+
let closePath: number;
|
|
166
|
+
}
|
|
160
167
|
export class FeatureTest {
|
|
161
168
|
static get isLittleEndian(): any;
|
|
162
169
|
static get isEvalSupported(): any;
|
|
@@ -179,7 +186,6 @@ export function getModificationDate(date?: Date): string;
|
|
|
179
186
|
export function getUuid(): string;
|
|
180
187
|
export function getVerbosityLevel(): number;
|
|
181
188
|
export const hexNumbers: string[];
|
|
182
|
-
export const IDENTITY_MATRIX: number[];
|
|
183
189
|
export namespace ImageKind {
|
|
184
190
|
let GRAYSCALE_1BPP: number;
|
|
185
191
|
let RGB_24BPP: number;
|
|
@@ -195,100 +201,105 @@ export function isArrayEqual(arr1: any, arr2: any): boolean;
|
|
|
195
201
|
export const isNodeJS: any;
|
|
196
202
|
export const LINE_DESCENT_FACTOR: 0.35;
|
|
197
203
|
export const LINE_FACTOR: 1.35;
|
|
204
|
+
export function MathClamp(v: any, min: any, max: any): number;
|
|
198
205
|
export function normalizeUnicode(str: any): any;
|
|
199
|
-
export function objectFromMap(map: any): any;
|
|
200
206
|
export function objectSize(obj: any): number;
|
|
201
207
|
export namespace OPS {
|
|
202
|
-
let dependency: number;
|
|
203
|
-
let setLineWidth: number;
|
|
204
|
-
let setLineCap: number;
|
|
205
|
-
let setLineJoin: number;
|
|
206
|
-
let setMiterLimit: number;
|
|
207
|
-
let setDash: number;
|
|
208
|
-
let setRenderingIntent: number;
|
|
209
|
-
let setFlatness: number;
|
|
210
|
-
let setGState: number;
|
|
211
|
-
let save: number;
|
|
212
|
-
let restore: number;
|
|
213
|
-
let transform: number;
|
|
214
|
-
let
|
|
215
|
-
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
let
|
|
219
|
-
|
|
220
|
-
let
|
|
221
|
-
let
|
|
222
|
-
let
|
|
223
|
-
|
|
224
|
-
let
|
|
225
|
-
let
|
|
226
|
-
let
|
|
227
|
-
let
|
|
228
|
-
let
|
|
229
|
-
let
|
|
230
|
-
let
|
|
231
|
-
let
|
|
232
|
-
let
|
|
233
|
-
let
|
|
234
|
-
let
|
|
235
|
-
let
|
|
236
|
-
let
|
|
237
|
-
let
|
|
238
|
-
let
|
|
239
|
-
let
|
|
240
|
-
let
|
|
241
|
-
let
|
|
242
|
-
let
|
|
243
|
-
let
|
|
244
|
-
let
|
|
245
|
-
let
|
|
246
|
-
let
|
|
247
|
-
let
|
|
248
|
-
let
|
|
249
|
-
let
|
|
250
|
-
let
|
|
251
|
-
let
|
|
252
|
-
let
|
|
253
|
-
let
|
|
254
|
-
let
|
|
255
|
-
let
|
|
256
|
-
let
|
|
257
|
-
let
|
|
258
|
-
let
|
|
259
|
-
let
|
|
260
|
-
let
|
|
261
|
-
let
|
|
262
|
-
let
|
|
263
|
-
let
|
|
264
|
-
let
|
|
265
|
-
let
|
|
266
|
-
let
|
|
267
|
-
let
|
|
268
|
-
let
|
|
269
|
-
let
|
|
270
|
-
let
|
|
271
|
-
let
|
|
272
|
-
let
|
|
273
|
-
let
|
|
274
|
-
let
|
|
275
|
-
let
|
|
276
|
-
let
|
|
277
|
-
let
|
|
278
|
-
let
|
|
279
|
-
let
|
|
280
|
-
let
|
|
281
|
-
let
|
|
282
|
-
let
|
|
283
|
-
let
|
|
284
|
-
let
|
|
285
|
-
let
|
|
286
|
-
let
|
|
287
|
-
let
|
|
288
|
-
let
|
|
289
|
-
let
|
|
290
|
-
let
|
|
291
|
-
let
|
|
208
|
+
export let dependency: number;
|
|
209
|
+
export let setLineWidth: number;
|
|
210
|
+
export let setLineCap: number;
|
|
211
|
+
export let setLineJoin: number;
|
|
212
|
+
export let setMiterLimit: number;
|
|
213
|
+
export let setDash: number;
|
|
214
|
+
export let setRenderingIntent: number;
|
|
215
|
+
export let setFlatness: number;
|
|
216
|
+
export let setGState: number;
|
|
217
|
+
export let save: number;
|
|
218
|
+
export let restore: number;
|
|
219
|
+
export let transform: number;
|
|
220
|
+
let moveTo_1: number;
|
|
221
|
+
export { moveTo_1 as moveTo };
|
|
222
|
+
let lineTo_1: number;
|
|
223
|
+
export { lineTo_1 as lineTo };
|
|
224
|
+
let curveTo_1: number;
|
|
225
|
+
export { curveTo_1 as curveTo };
|
|
226
|
+
export let curveTo2: number;
|
|
227
|
+
export let curveTo3: number;
|
|
228
|
+
let closePath_1: number;
|
|
229
|
+
export { closePath_1 as closePath };
|
|
230
|
+
export let rectangle: number;
|
|
231
|
+
export let stroke: number;
|
|
232
|
+
export let closeStroke: number;
|
|
233
|
+
export let fill: number;
|
|
234
|
+
export let eoFill: number;
|
|
235
|
+
export let fillStroke: number;
|
|
236
|
+
export let eoFillStroke: number;
|
|
237
|
+
export let closeFillStroke: number;
|
|
238
|
+
export let closeEOFillStroke: number;
|
|
239
|
+
export let endPath: number;
|
|
240
|
+
export let clip: number;
|
|
241
|
+
export let eoClip: number;
|
|
242
|
+
export let beginText: number;
|
|
243
|
+
export let endText: number;
|
|
244
|
+
export let setCharSpacing: number;
|
|
245
|
+
export let setWordSpacing: number;
|
|
246
|
+
export let setHScale: number;
|
|
247
|
+
export let setLeading: number;
|
|
248
|
+
export let setFont: number;
|
|
249
|
+
export let setTextRenderingMode: number;
|
|
250
|
+
export let setTextRise: number;
|
|
251
|
+
export let moveText: number;
|
|
252
|
+
export let setLeadingMoveText: number;
|
|
253
|
+
export let setTextMatrix: number;
|
|
254
|
+
export let nextLine: number;
|
|
255
|
+
export let showText: number;
|
|
256
|
+
export let showSpacedText: number;
|
|
257
|
+
export let nextLineShowText: number;
|
|
258
|
+
export let nextLineSetSpacingShowText: number;
|
|
259
|
+
export let setCharWidth: number;
|
|
260
|
+
export let setCharWidthAndBounds: number;
|
|
261
|
+
export let setStrokeColorSpace: number;
|
|
262
|
+
export let setFillColorSpace: number;
|
|
263
|
+
export let setStrokeColor: number;
|
|
264
|
+
export let setStrokeColorN: number;
|
|
265
|
+
export let setFillColor: number;
|
|
266
|
+
export let setFillColorN: number;
|
|
267
|
+
export let setStrokeGray: number;
|
|
268
|
+
export let setFillGray: number;
|
|
269
|
+
export let setStrokeRGBColor: number;
|
|
270
|
+
export let setFillRGBColor: number;
|
|
271
|
+
export let setStrokeCMYKColor: number;
|
|
272
|
+
export let setFillCMYKColor: number;
|
|
273
|
+
export let shadingFill: number;
|
|
274
|
+
export let beginInlineImage: number;
|
|
275
|
+
export let beginImageData: number;
|
|
276
|
+
export let endInlineImage: number;
|
|
277
|
+
export let paintXObject: number;
|
|
278
|
+
export let markPoint: number;
|
|
279
|
+
export let markPointProps: number;
|
|
280
|
+
export let beginMarkedContent: number;
|
|
281
|
+
export let beginMarkedContentProps: number;
|
|
282
|
+
export let endMarkedContent: number;
|
|
283
|
+
export let beginCompat: number;
|
|
284
|
+
export let endCompat: number;
|
|
285
|
+
export let paintFormXObjectBegin: number;
|
|
286
|
+
export let paintFormXObjectEnd: number;
|
|
287
|
+
export let beginGroup: number;
|
|
288
|
+
export let endGroup: number;
|
|
289
|
+
export let beginAnnotation: number;
|
|
290
|
+
export let endAnnotation: number;
|
|
291
|
+
export let paintImageMaskXObject: number;
|
|
292
|
+
export let paintImageMaskXObjectGroup: number;
|
|
293
|
+
export let paintImageXObject: number;
|
|
294
|
+
export let paintInlineImageXObject: number;
|
|
295
|
+
export let paintInlineImageXObjectGroup: number;
|
|
296
|
+
export let paintImageXObjectRepeat: number;
|
|
297
|
+
export let paintImageMaskXObjectRepeat: number;
|
|
298
|
+
export let paintSolidColorImageMask: number;
|
|
299
|
+
export let constructPath: number;
|
|
300
|
+
export let setStrokeTransparent: number;
|
|
301
|
+
export let setFillTransparent: number;
|
|
302
|
+
export let rawFillPath: number;
|
|
292
303
|
}
|
|
293
304
|
export namespace PageActionEventType {
|
|
294
305
|
export let O: string;
|
|
@@ -339,7 +350,7 @@ export function setVerbosityLevel(level: any): void;
|
|
|
339
350
|
export function shadow(obj: any, prop: any, value: any, nonSerializable?: boolean): any;
|
|
340
351
|
export function string32(value: any): string;
|
|
341
352
|
export function stringToBytes(str: any): Uint8Array<any>;
|
|
342
|
-
export function stringToPDFString(str: any): string;
|
|
353
|
+
export function stringToPDFString(str: any, keepEscapeSequence?: boolean): string;
|
|
343
354
|
export function stringToUTF8String(str: any): string;
|
|
344
355
|
export namespace TextRenderingMode {
|
|
345
356
|
export let FILL: number;
|
|
@@ -363,21 +374,33 @@ export class UnknownErrorException extends UnknownErrorException_base {
|
|
|
363
374
|
details: any;
|
|
364
375
|
}
|
|
365
376
|
export function unreachable(msg: any): void;
|
|
377
|
+
/**
|
|
378
|
+
* Remove, or replace, the hash property of the URL.
|
|
379
|
+
*
|
|
380
|
+
* @param {URL|string} url - The absolute, or relative, URL.
|
|
381
|
+
* @param {string} hash - The hash property (use an empty string to remove it).
|
|
382
|
+
* @param {boolean} [allowRel] - Allow relative URLs.
|
|
383
|
+
* @returns {string} The resulting URL string.
|
|
384
|
+
*/
|
|
385
|
+
export function updateUrlHash(url: URL | string, hash: string, allowRel?: boolean): string;
|
|
366
386
|
export function utf8StringToString(str: any): string;
|
|
367
387
|
export class Util {
|
|
368
388
|
static makeHexColor(r: any, g: any, b: any): string;
|
|
369
389
|
static scaleMinMax(transform: any, minMax: any): void;
|
|
370
390
|
static transform(m1: any, m2: any): any[];
|
|
371
|
-
static applyTransform(p: any, m: any):
|
|
372
|
-
static
|
|
373
|
-
static
|
|
391
|
+
static applyTransform(p: any, m: any, pos?: number): void;
|
|
392
|
+
static applyTransformToBezier(p: any, transform: any, pos?: number): void;
|
|
393
|
+
static applyInverseTransform(p: any, m: any): void;
|
|
394
|
+
static axialAlignedBoundingBox(rect: any, transform: any, output: any): void;
|
|
374
395
|
static inverseTransform(m: any): number[];
|
|
375
|
-
static singularValueDecompose2dScale(
|
|
396
|
+
static singularValueDecompose2dScale(matrix: any, output: any): void;
|
|
376
397
|
static normalizeRect(rect: any): any;
|
|
377
398
|
static intersect(rect1: any, rect2: any): number[] | null;
|
|
378
|
-
static
|
|
379
|
-
static
|
|
380
|
-
static
|
|
399
|
+
static pointBoundingBox(x: any, y: any, minMax: any): void;
|
|
400
|
+
static rectBoundingBox(x0: any, y0: any, x1: any, y1: any, minMax: any): void;
|
|
401
|
+
static #getExtremumOnCurve(x0: any, x1: any, x2: any, x3: any, y0: any, y1: any, y2: any, y3: any, t: any, minMax: any): void;
|
|
402
|
+
static #getExtremum(x0: any, x1: any, x2: any, x3: any, y0: any, y1: any, y2: any, y3: any, a: any, b: any, c: any, minMax: any): void;
|
|
403
|
+
static bezierBoundingBox(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, minMax: any): void;
|
|
381
404
|
}
|
|
382
405
|
export namespace VerbosityLevel {
|
|
383
406
|
let ERRORS: number;
|
|
@@ -14,7 +14,7 @@ export class TextAccessibilityManager {
|
|
|
14
14
|
* @param {HTMLElement} e2
|
|
15
15
|
* @returns {number}
|
|
16
16
|
*/
|
|
17
|
-
static
|
|
17
|
+
static #compareElementPositions(e1: HTMLElement, e2: HTMLElement): number;
|
|
18
18
|
setTextMapping(textDivs: any): void;
|
|
19
19
|
/**
|
|
20
20
|
* Function called when the text layer has finished rendering.
|