@chialab/pdfjs-lib 1.0.0-alpha.11 → 1.0.0-alpha.12
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/browser/{chunk-AK2AE3GS.js → chunk-TKDBOXH4.js} +31 -39
- package/dist/browser/index.js +614 -493
- package/dist/browser/openjpeg-K2XBCFFN.js +9 -0
- package/dist/browser/qcms_bg-Q7BRLLZG.js +9 -0
- package/dist/browser/worker.js +1260 -1121
- package/dist/lib/utils.d.ts +6 -0
- package/dist/node/{chunk-WL32POZ2.js → chunk-MAMMG4XK.js} +31 -39
- package/dist/node/index.js +755 -495
- package/dist/node/openjpeg-B2WN24QZ.js +9 -0
- package/dist/node/qcms_bg-T4RSHPOQ.js +9 -0
- package/dist/node/worker.js +1260 -1121
- package/dist/pdf.js/src/display/annotation_storage.d.ts +1 -8
- package/dist/pdf.js/src/display/api.d.ts +10 -69
- package/dist/pdf.js/src/display/api_utils.d.ts +13 -0
- package/dist/pdf.js/src/display/canvas.d.ts +2 -2
- package/dist/pdf.js/src/display/display_utils.d.ts +2 -1
- package/dist/pdf.js/src/display/editor/annotation_editor_layer.d.ts +4 -4
- package/dist/pdf.js/src/display/editor/editor.d.ts +17 -3
- package/dist/pdf.js/src/display/editor/freetext.d.ts +2 -5
- package/dist/pdf.js/src/display/editor/tools.d.ts +2 -1
- 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/pdf_objects.d.ts +40 -0
- package/dist/pdf.js/src/display/text_layer.d.ts +9 -9
- package/dist/pdf.js/src/display/worker_options.d.ts +2 -2
- package/dist/pdf.js/src/pdf.d.ts +3 -2
- package/dist/pdf.js/src/shared/util.d.ts +12 -5
- package/package.json +1 -1
- package/dist/browser/openjpeg-NLAGCGEG.js +0 -9
- package/dist/browser/qcms_bg-EPYCMBVV.js +0 -9
- package/dist/node/openjpeg-O3KQE6R6.js +0 -9
- package/dist/node/qcms_bg-5Z325MLG.js +0 -9
|
@@ -35,14 +35,6 @@ export class AnnotationStorage {
|
|
|
35
35
|
* @returns {boolean}
|
|
36
36
|
*/
|
|
37
37
|
has(key: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @returns {Object | null}
|
|
40
|
-
*/
|
|
41
|
-
getAll(): Object | null;
|
|
42
|
-
/**
|
|
43
|
-
* @param {Object} obj
|
|
44
|
-
*/
|
|
45
|
-
setAll(obj: Object): void;
|
|
46
38
|
get size(): number;
|
|
47
39
|
resetModified(): void;
|
|
48
40
|
/**
|
|
@@ -71,6 +63,7 @@ export class AnnotationStorage {
|
|
|
71
63
|
ids: Set<string>;
|
|
72
64
|
hash: string;
|
|
73
65
|
};
|
|
66
|
+
[Symbol.iterator](): MapIterator<[any, any]>;
|
|
74
67
|
#private;
|
|
75
68
|
}
|
|
76
69
|
/**
|
|
@@ -48,7 +48,7 @@ export type DocumentInitParameters = {
|
|
|
48
48
|
range?: PDFDataRangeTransport | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* - Specify maximum number of bytes fetched
|
|
51
|
-
* per range request. The default value is
|
|
51
|
+
* per range request. The default value is 65536 (= 2^16).
|
|
52
52
|
*/
|
|
53
53
|
rangeChunkSize?: number | undefined;
|
|
54
54
|
/**
|
|
@@ -609,7 +609,7 @@ export const build: string;
|
|
|
609
609
|
* @property {PDFDataRangeTransport} [range] - Allows for using a custom range
|
|
610
610
|
* transport implementation.
|
|
611
611
|
* @property {number} [rangeChunkSize] - Specify maximum number of bytes fetched
|
|
612
|
-
* per range request. The default value is
|
|
612
|
+
* per range request. The default value is 65536 (= 2^16).
|
|
613
613
|
* @property {PDFWorker} [worker] - The worker that will be used for loading and
|
|
614
614
|
* parsing the PDF data.
|
|
615
615
|
* @property {number} [verbosity] - Controls the logging level; the constants
|
|
@@ -732,14 +732,6 @@ export const build: string;
|
|
|
732
732
|
* @returns {PDFDocumentLoadingTask}
|
|
733
733
|
*/
|
|
734
734
|
export function getDocument(src?: string | URL | TypedArray | ArrayBuffer | DocumentInitParameters): PDFDocumentLoadingTask;
|
|
735
|
-
export const isValidExplicitDest: (dest?: any) => boolean;
|
|
736
|
-
export class LoopbackPort {
|
|
737
|
-
postMessage(obj: any, transfer: any): void;
|
|
738
|
-
addEventListener(name: any, listener: any, options?: null): void;
|
|
739
|
-
removeEventListener(name: any, listener: any): void;
|
|
740
|
-
terminate(): void;
|
|
741
|
-
#private;
|
|
742
|
-
}
|
|
743
735
|
/**
|
|
744
736
|
* Abstract class to support range requests file loading.
|
|
745
737
|
*
|
|
@@ -759,11 +751,6 @@ export class PDFDataRangeTransport {
|
|
|
759
751
|
initialData: Uint8Array<ArrayBufferLike> | null;
|
|
760
752
|
progressiveDone: boolean;
|
|
761
753
|
contentDispositionFilename: string;
|
|
762
|
-
_rangeListeners: any[];
|
|
763
|
-
_progressListeners: any[];
|
|
764
|
-
_progressiveReadListeners: any[];
|
|
765
|
-
_progressiveDoneListeners: any[];
|
|
766
|
-
_readyCapability: PromiseWithResolvers<any>;
|
|
767
754
|
/**
|
|
768
755
|
* @param {function} listener
|
|
769
756
|
*/
|
|
@@ -802,6 +789,7 @@ export class PDFDataRangeTransport {
|
|
|
802
789
|
*/
|
|
803
790
|
requestDataRange(begin: number, end: number): void;
|
|
804
791
|
abort(): void;
|
|
792
|
+
#private;
|
|
805
793
|
}
|
|
806
794
|
/**
|
|
807
795
|
* @typedef {Object} OnProgressParameters
|
|
@@ -814,7 +802,7 @@ export class PDFDataRangeTransport {
|
|
|
814
802
|
* after which individual pages can be rendered.
|
|
815
803
|
*/
|
|
816
804
|
export class PDFDocumentLoadingTask {
|
|
817
|
-
static "__#
|
|
805
|
+
static "__#57@#docId": number;
|
|
818
806
|
/**
|
|
819
807
|
* @private
|
|
820
808
|
*/
|
|
@@ -1467,20 +1455,20 @@ export class PDFPageProxy {
|
|
|
1467
1455
|
* @param {PDFWorkerParameters} params - The worker initialization parameters.
|
|
1468
1456
|
*/
|
|
1469
1457
|
export class PDFWorker {
|
|
1470
|
-
static "__#
|
|
1471
|
-
static "__#
|
|
1472
|
-
static "__#
|
|
1458
|
+
static "__#60@#fakeWorkerId": number;
|
|
1459
|
+
static "__#60@#isWorkerDisabled": boolean;
|
|
1460
|
+
static "__#60@#workerPorts": WeakMap<WeakKey, any>;
|
|
1473
1461
|
/**
|
|
1474
1462
|
* @param {PDFWorkerParameters} params - The worker initialization parameters.
|
|
1475
1463
|
* @returns {PDFWorker}
|
|
1476
1464
|
*/
|
|
1477
|
-
static
|
|
1465
|
+
static create(params: PDFWorkerParameters): PDFWorker;
|
|
1478
1466
|
/**
|
|
1479
1467
|
* The current `workerSrc`, when it exists.
|
|
1480
1468
|
* @type {string}
|
|
1481
1469
|
*/
|
|
1482
1470
|
static get workerSrc(): string;
|
|
1483
|
-
static get "__#
|
|
1471
|
+
static get "__#60@#mainThreadWorkerMessageHandler"(): any;
|
|
1484
1472
|
static get _setupFakeWorkerGlobal(): any;
|
|
1485
1473
|
constructor({ name, port, verbosity, }?: {
|
|
1486
1474
|
name?: null | undefined;
|
|
@@ -1490,10 +1478,6 @@ export class PDFWorker {
|
|
|
1490
1478
|
name: any;
|
|
1491
1479
|
destroyed: boolean;
|
|
1492
1480
|
verbosity: number;
|
|
1493
|
-
_readyCapability: PromiseWithResolvers<any>;
|
|
1494
|
-
_port: any;
|
|
1495
|
-
_webWorker: Worker | null;
|
|
1496
|
-
_messageHandler: MessageHandler | null;
|
|
1497
1481
|
/**
|
|
1498
1482
|
* Promise for worker initialization completion.
|
|
1499
1483
|
* @type {Promise<void>}
|
|
@@ -1509,9 +1493,6 @@ export class PDFWorker {
|
|
|
1509
1493
|
* @type {MessageHandler}
|
|
1510
1494
|
*/
|
|
1511
1495
|
get messageHandler(): MessageHandler;
|
|
1512
|
-
_initializeFromPort(port: any): void;
|
|
1513
|
-
_initialize(): void;
|
|
1514
|
-
_setupFakeWorker(): void;
|
|
1515
1496
|
/**
|
|
1516
1497
|
* Destroys the worker instance.
|
|
1517
1498
|
*/
|
|
@@ -1567,45 +1548,5 @@ import { PrintAnnotationStorage } from "./annotation_storage.js";
|
|
|
1567
1548
|
import { AnnotationStorage } from "./annotation_storage.js";
|
|
1568
1549
|
import { Metadata } from "./metadata.js";
|
|
1569
1550
|
import { StatTimer } from "./display_utils.js";
|
|
1570
|
-
|
|
1571
|
-
* A PDF document and page is built of many objects. E.g. there are objects for
|
|
1572
|
-
* fonts, images, rendering code, etc. These objects may get processed inside of
|
|
1573
|
-
* a worker. This class implements some basic methods to manage these objects.
|
|
1574
|
-
*/
|
|
1575
|
-
declare class PDFObjects {
|
|
1576
|
-
/**
|
|
1577
|
-
* If called *without* callback, this returns the data of `objId` but the
|
|
1578
|
-
* object needs to be resolved. If it isn't, this method throws.
|
|
1579
|
-
*
|
|
1580
|
-
* If called *with* a callback, the callback is called with the data of the
|
|
1581
|
-
* object once the object is resolved. That means, if you call this method
|
|
1582
|
-
* and the object is already resolved, the callback gets called right away.
|
|
1583
|
-
*
|
|
1584
|
-
* @param {string} objId
|
|
1585
|
-
* @param {function} [callback]
|
|
1586
|
-
* @returns {any}
|
|
1587
|
-
*/
|
|
1588
|
-
get(objId: string, callback?: Function): any;
|
|
1589
|
-
/**
|
|
1590
|
-
* @param {string} objId
|
|
1591
|
-
* @returns {boolean}
|
|
1592
|
-
*/
|
|
1593
|
-
has(objId: string): boolean;
|
|
1594
|
-
/**
|
|
1595
|
-
* @param {string} objId
|
|
1596
|
-
* @returns {boolean}
|
|
1597
|
-
*/
|
|
1598
|
-
delete(objId: string): boolean;
|
|
1599
|
-
/**
|
|
1600
|
-
* Resolves the object `objId` with optional `data`.
|
|
1601
|
-
*
|
|
1602
|
-
* @param {string} objId
|
|
1603
|
-
* @param {any} [data]
|
|
1604
|
-
*/
|
|
1605
|
-
resolve(objId: string, data?: any): void;
|
|
1606
|
-
clear(): void;
|
|
1607
|
-
[Symbol.iterator](): Generator<any[], void, unknown>;
|
|
1608
|
-
#private;
|
|
1609
|
-
}
|
|
1551
|
+
import { PDFObjects } from "./pdf_objects.js";
|
|
1610
1552
|
import { MessageHandler } from "../shared/message_handler.js";
|
|
1611
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getDataProp(val: any): Uint8Array<any>;
|
|
2
|
+
export function getFactoryUrlProp(val: any): string | null;
|
|
3
|
+
export function getUrlProp(val: any): string | null;
|
|
4
|
+
export function isNameProxy(v: any): boolean;
|
|
5
|
+
export function isRefProxy(v: any): boolean;
|
|
6
|
+
export const isValidExplicitDest: (dest?: any) => boolean;
|
|
7
|
+
export class LoopbackPort {
|
|
8
|
+
postMessage(obj: any, transfer: any): void;
|
|
9
|
+
addEventListener(name: any, listener: any, options?: null): void;
|
|
10
|
+
removeEventListener(name: any, listener: any): void;
|
|
11
|
+
terminate(): void;
|
|
12
|
+
#private;
|
|
13
|
+
}
|
|
@@ -119,9 +119,9 @@ export class CanvasGraphics {
|
|
|
119
119
|
getColorN_Pattern(IR: any): any;
|
|
120
120
|
setStrokeColorN(...args: any[]): void;
|
|
121
121
|
setFillColorN(...args: any[]): void;
|
|
122
|
-
setStrokeRGBColor(
|
|
122
|
+
setStrokeRGBColor(color: any): void;
|
|
123
123
|
setStrokeTransparent(): void;
|
|
124
|
-
setFillRGBColor(
|
|
124
|
+
setFillRGBColor(color: any): void;
|
|
125
125
|
setFillTransparent(): void;
|
|
126
126
|
_getPattern(objId: any, matrix?: null): any;
|
|
127
127
|
shadingFill(objId: any): void;
|
|
@@ -98,6 +98,7 @@ export function noContextMenu(e: any): void;
|
|
|
98
98
|
*/
|
|
99
99
|
export class OutputScale {
|
|
100
100
|
static get pixelRatio(): number;
|
|
101
|
+
static capPixels(maxPixels: any, capAreaFactor: any): any;
|
|
101
102
|
/**
|
|
102
103
|
* @type {number} Horizontal scale.
|
|
103
104
|
*/
|
|
@@ -119,7 +120,7 @@ export class OutputScale {
|
|
|
119
120
|
* @returns {boolean} Returns `true` if scaling was limited,
|
|
120
121
|
* `false` otherwise.
|
|
121
122
|
*/
|
|
122
|
-
limitCanvas(width: any, height: any, maxPixels: any, maxDim: any): boolean;
|
|
123
|
+
limitCanvas(width: any, height: any, maxPixels: any, maxDim: any, capAreaFactor?: number): boolean;
|
|
123
124
|
}
|
|
124
125
|
/**
|
|
125
126
|
* @typedef {Object} PageViewportParameters
|
|
@@ -60,9 +60,9 @@ export class AnnotationEditorLayer {
|
|
|
60
60
|
get isInvisible(): boolean;
|
|
61
61
|
/**
|
|
62
62
|
* Update the toolbar if it's required to reflect the tool currently used.
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {Object} options
|
|
64
64
|
*/
|
|
65
|
-
updateToolbar(
|
|
65
|
+
updateToolbar(options: Object): void;
|
|
66
66
|
/**
|
|
67
67
|
* The mode has changed: it must be updated.
|
|
68
68
|
* @param {number} mode
|
|
@@ -140,10 +140,10 @@ export class AnnotationEditorLayer {
|
|
|
140
140
|
canCreateNewEmptyEditor(): boolean | undefined;
|
|
141
141
|
/**
|
|
142
142
|
* Paste some content into a new editor.
|
|
143
|
-
* @param {
|
|
143
|
+
* @param {Object} options
|
|
144
144
|
* @param {Object} params
|
|
145
145
|
*/
|
|
146
|
-
pasteEditor(
|
|
146
|
+
pasteEditor(options: Object, params: Object): Promise<void>;
|
|
147
147
|
/**
|
|
148
148
|
* Create a new editor
|
|
149
149
|
* @param {Object} data
|
|
@@ -91,6 +91,7 @@ export class AnnotationEditor {
|
|
|
91
91
|
* @param {AnnotationEditorParameters} parameters
|
|
92
92
|
*/
|
|
93
93
|
constructor(parameters: AnnotationEditorParameters);
|
|
94
|
+
isSelected: boolean;
|
|
94
95
|
_isCopy: boolean;
|
|
95
96
|
_editToolbar: null;
|
|
96
97
|
_initialOptions: any;
|
|
@@ -283,7 +284,6 @@ export class AnnotationEditor {
|
|
|
283
284
|
* @param {PointerEvent} event
|
|
284
285
|
*/
|
|
285
286
|
pointerdown(event: PointerEvent): void;
|
|
286
|
-
get isSelected(): any;
|
|
287
287
|
_onStartDragging(): void;
|
|
288
288
|
_onStopDragging(): void;
|
|
289
289
|
moveInDOM(): void;
|
|
@@ -308,12 +308,14 @@ export class AnnotationEditor {
|
|
|
308
308
|
isEmpty(): boolean;
|
|
309
309
|
/**
|
|
310
310
|
* Enable edit mode.
|
|
311
|
+
* @returns {boolean} - true if the edit mode has been enabled.
|
|
311
312
|
*/
|
|
312
|
-
enableEditMode():
|
|
313
|
+
enableEditMode(): boolean;
|
|
313
314
|
/**
|
|
314
315
|
* Disable edit mode.
|
|
316
|
+
* @returns {boolean} - true if the edit mode has been disabled.
|
|
315
317
|
*/
|
|
316
|
-
disableEditMode():
|
|
318
|
+
disableEditMode(): boolean;
|
|
317
319
|
/**
|
|
318
320
|
* Check if the editor is edited.
|
|
319
321
|
* @returns {boolean}
|
|
@@ -413,10 +415,22 @@ export class AnnotationEditor {
|
|
|
413
415
|
* their properties.
|
|
414
416
|
*/
|
|
415
417
|
enableEditing(): void;
|
|
418
|
+
/**
|
|
419
|
+
* Check if the content of this editor can be changed.
|
|
420
|
+
* For example, a FreeText editor can be changed (the user can change the
|
|
421
|
+
* text), but a Stamp editor cannot.
|
|
422
|
+
* @returns {boolean}
|
|
423
|
+
*/
|
|
424
|
+
get canChangeContent(): boolean;
|
|
416
425
|
/**
|
|
417
426
|
* The editor is about to be edited.
|
|
418
427
|
*/
|
|
419
428
|
enterInEditMode(): void;
|
|
429
|
+
/**
|
|
430
|
+
* ondblclick callback.
|
|
431
|
+
* @param {MouseEvent} event
|
|
432
|
+
*/
|
|
433
|
+
dblclick(event: MouseEvent): void;
|
|
420
434
|
/**
|
|
421
435
|
* @returns {HTMLElement | null} the element requiring an alt text.
|
|
422
436
|
*/
|
|
@@ -38,11 +38,8 @@ export class FreeTextEditor extends AnnotationEditor {
|
|
|
38
38
|
* @returns {undefined}
|
|
39
39
|
*/
|
|
40
40
|
commit(): undefined;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
* @param {MouseEvent} event
|
|
44
|
-
*/
|
|
45
|
-
dblclick(event: MouseEvent): void;
|
|
41
|
+
/** @inheritdoc */
|
|
42
|
+
keydown(event: any): void;
|
|
46
43
|
editorDivKeydown(event: any): void;
|
|
47
44
|
editorDivFocus(event: any): void;
|
|
48
45
|
editorDivBlur(event: any): void;
|
|
@@ -146,10 +146,11 @@ export class AnnotationEditorUIManager {
|
|
|
146
146
|
addNewEditorFromKeyboard(): void;
|
|
147
147
|
/**
|
|
148
148
|
* Update the toolbar if it's required to reflect the tool currently used.
|
|
149
|
+
* @param {Object} options
|
|
149
150
|
* @param {number} mode
|
|
150
151
|
* @returns {undefined}
|
|
151
152
|
*/
|
|
152
|
-
updateToolbar(
|
|
153
|
+
updateToolbar(options: Object): undefined;
|
|
153
154
|
/**
|
|
154
155
|
* Update a parameter in the current editor or globally.
|
|
155
156
|
* @param {number} type
|
|
@@ -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 "__#56@#ascentCache": Map<any, any>;
|
|
35
|
+
static "__#56@#canvasContexts": Map<any, any>;
|
|
36
|
+
static "__#56@#canvasCtxFonts": WeakMap<WeakKey, any>;
|
|
37
|
+
static "__#56@#minFontSize": null;
|
|
38
|
+
static "__#56@#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 "__#56@#getCtx"(lang?: null): any;
|
|
46
|
+
static "__#56@#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 "__#56@#ensureMinFontSizeComputed"(): void;
|
|
51
|
+
static "__#56@#getAscent"(fontFamily: any, style: any, lang: any): any;
|
|
52
52
|
/**
|
|
53
53
|
* @param {TextLayerParameters} options
|
|
54
54
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class GlobalWorkerOptions {
|
|
2
|
-
static "__#
|
|
3
|
-
static "__#
|
|
2
|
+
static "__#51@#port": null;
|
|
3
|
+
static "__#51@#src": string;
|
|
4
4
|
/**
|
|
5
5
|
* @param {Worker | null} workerPort - Defines global port for worker process.
|
|
6
6
|
* Overrides the `workerSrc` option.
|
package/dist/pdf.js/src/pdf.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ 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/
|
|
32
|
+
import { isValidExplicitDest } from "./display/api_utils.js";
|
|
33
33
|
import { MathClamp } from "./shared/util.js";
|
|
34
34
|
import { noContextMenu } from "./display/display_utils.js";
|
|
35
35
|
import { normalizeUnicode } from "./shared/util.js";
|
|
@@ -50,8 +50,9 @@ import { stopEvent } from "./display/display_utils.js";
|
|
|
50
50
|
import { SupportedImageMimeTypes } from "./display/display_utils.js";
|
|
51
51
|
import { TextLayer } from "./display/text_layer.js";
|
|
52
52
|
import { TouchManager } from "./display/touch_manager.js";
|
|
53
|
+
import { updateUrlHash } from "./shared/util.js";
|
|
53
54
|
import { Util } from "./shared/util.js";
|
|
54
55
|
import { VerbosityLevel } from "./shared/util.js";
|
|
55
56
|
import { version } from "./display/api.js";
|
|
56
57
|
import { XfaLayer } from "./display/xfa_layer.js";
|
|
57
|
-
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, 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 };
|
|
@@ -186,7 +186,6 @@ export function getModificationDate(date?: Date): string;
|
|
|
186
186
|
export function getUuid(): string;
|
|
187
187
|
export function getVerbosityLevel(): number;
|
|
188
188
|
export const hexNumbers: string[];
|
|
189
|
-
export const IDENTITY_MATRIX: number[];
|
|
190
189
|
export namespace ImageKind {
|
|
191
190
|
let GRAYSCALE_1BPP: number;
|
|
192
191
|
let RGB_24BPP: number;
|
|
@@ -204,7 +203,6 @@ export const LINE_DESCENT_FACTOR: 0.35;
|
|
|
204
203
|
export const LINE_FACTOR: 1.35;
|
|
205
204
|
export function MathClamp(v: any, min: any, max: any): number;
|
|
206
205
|
export function normalizeUnicode(str: any): any;
|
|
207
|
-
export function objectFromMap(map: any): any;
|
|
208
206
|
export function objectSize(obj: any): number;
|
|
209
207
|
export namespace OPS {
|
|
210
208
|
export let dependency: number;
|
|
@@ -352,7 +350,7 @@ export function setVerbosityLevel(level: any): void;
|
|
|
352
350
|
export function shadow(obj: any, prop: any, value: any, nonSerializable?: boolean): any;
|
|
353
351
|
export function string32(value: any): string;
|
|
354
352
|
export function stringToBytes(str: any): Uint8Array<any>;
|
|
355
|
-
export function stringToPDFString(str: any): string;
|
|
353
|
+
export function stringToPDFString(str: any, keepEscapeSequence?: boolean): string;
|
|
356
354
|
export function stringToUTF8String(str: any): string;
|
|
357
355
|
export namespace TextRenderingMode {
|
|
358
356
|
export let FILL: number;
|
|
@@ -376,13 +374,22 @@ export class UnknownErrorException extends UnknownErrorException_base {
|
|
|
376
374
|
details: any;
|
|
377
375
|
}
|
|
378
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;
|
|
379
386
|
export function utf8StringToString(str: any): string;
|
|
380
387
|
export class Util {
|
|
381
388
|
static makeHexColor(r: any, g: any, b: any): string;
|
|
382
389
|
static scaleMinMax(transform: any, minMax: any): void;
|
|
383
390
|
static transform(m1: any, m2: any): any[];
|
|
384
|
-
static applyTransform(p: any, m: any): void;
|
|
385
|
-
static applyTransformToBezier(p: any, transform: any): void;
|
|
391
|
+
static applyTransform(p: any, m: any, pos?: number): void;
|
|
392
|
+
static applyTransformToBezier(p: any, transform: any, pos?: number): void;
|
|
386
393
|
static applyInverseTransform(p: any, m: any): void;
|
|
387
394
|
static axialAlignedBoundingBox(rect: any, transform: any, output: any): void;
|
|
388
395
|
static inverseTransform(m: any): number[];
|
package/package.json
CHANGED