@chialab/pdfjs-lib 1.0.0-alpha.26 → 1.0.0-alpha.28

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.
Files changed (124) hide show
  1. package/dist/browser/{FoxitDingbats-SB6TO3S5.js → FoxitDingbats-XZTZYAP6.js} +1 -1
  2. package/dist/browser/{FoxitFixed-UIGSMBQB.js → FoxitFixed-DRWD6QNM.js} +1 -1
  3. package/dist/browser/{FoxitFixedBold-2PAEIZAT.js → FoxitFixedBold-A3IBPIFC.js} +1 -1
  4. package/dist/browser/{FoxitFixedBoldItalic-OSQUQDEE.js → FoxitFixedBoldItalic-V4ORMFGL.js} +1 -1
  5. package/dist/browser/{FoxitFixedItalic-W73RDK22.js → FoxitFixedItalic-Z7BSNTJA.js} +1 -1
  6. package/dist/browser/{FoxitSerif-3HH3SOZF.js → FoxitSerif-Y34FHWHO.js} +1 -1
  7. package/dist/browser/{FoxitSerifBold-HXP2QOO7.js → FoxitSerifBold-NCWBT4GX.js} +1 -1
  8. package/dist/browser/{FoxitSerifBoldItalic-FZXLNWD7.js → FoxitSerifBoldItalic-YTEOG5ZU.js} +1 -1
  9. package/dist/browser/{FoxitSerifItalic-WQFHUBI2.js → FoxitSerifItalic-3H547RIJ.js} +1 -1
  10. package/dist/browser/{FoxitSymbol-OVWU7LKS.js → FoxitSymbol-EMTQEYPB.js} +1 -1
  11. package/dist/browser/{LiberationSans-Bold-GSJN42N5.js → LiberationSans-Bold-MGX34QV4.js} +1 -1
  12. package/dist/browser/LiberationSans-Bold-PQY5JZAT.js +9 -0
  13. package/dist/browser/LiberationSans-BoldItalic-PBNZJX4S.js +9 -0
  14. package/dist/browser/{LiberationSans-BoldItalic-UCPQJ3L2.js → LiberationSans-BoldItalic-WSEQ5LH5.js} +1 -1
  15. package/dist/browser/{LiberationSans-Italic-6CIHEALY.js → LiberationSans-Italic-E4SLDR4M.js} +1 -1
  16. package/dist/browser/LiberationSans-Italic-NAYVQTNG.js +9 -0
  17. package/dist/browser/{LiberationSans-Regular-KIF3IRJY.js → LiberationSans-Regular-3SH5NGZO.js} +1 -1
  18. package/dist/browser/LiberationSans-Regular-FMNBW2LE.js +9 -0
  19. package/dist/browser/{NodeUtilsStabs-MUAXKISB.js → NodeUtilsStabs-AQQCOPNR.js} +1 -1
  20. package/dist/browser/{chunk-O4UKW7AD.js → chunk-7YYVRRNF.js} +5 -0
  21. package/dist/browser/{chunk-YWSFNHP3.js → chunk-W35PJZ6L.js} +1 -1
  22. package/dist/browser/index.js +13205 -245
  23. package/dist/browser/{openjpeg-K2XBCFFN.js → openjpeg-QLA762TL.js} +1 -1
  24. package/dist/browser/{qcms_bg-Q7BRLLZG.js → qcms_bg-BCJEADMU.js} +1 -1
  25. package/dist/browser/worker.js +114 -5
  26. package/dist/index.d.ts +2 -1
  27. package/dist/lib/StructTreePage.d.ts +5 -0
  28. package/dist/lib/Svg.d.ts +1 -0
  29. package/dist/lib/SvgCanvasContext.d.ts +3 -0
  30. package/dist/lib/TextLayer.d.ts +20 -3
  31. package/dist/lib/TextLayer_v2.d.ts +8 -0
  32. package/dist/node/{FoxitDingbats-65AZ2Z2V.js → FoxitDingbats-UZC34T4F.js} +1 -1
  33. package/dist/node/{FoxitFixed-OZGLVVOQ.js → FoxitFixed-DSJVG3IJ.js} +1 -1
  34. package/dist/node/{FoxitFixedBold-37OOYMV7.js → FoxitFixedBold-YSX4X5NA.js} +1 -1
  35. package/dist/node/{FoxitFixedBoldItalic-XYFHEG2V.js → FoxitFixedBoldItalic-IFYYA6RR.js} +1 -1
  36. package/dist/node/{FoxitFixedItalic-MM7OSGS6.js → FoxitFixedItalic-4PEFPCQV.js} +1 -1
  37. package/dist/node/{FoxitSerif-MLMJQPRP.js → FoxitSerif-7SSP2H2U.js} +1 -1
  38. package/dist/node/{FoxitSerifBold-AC7RJQWJ.js → FoxitSerifBold-KLMURJ6N.js} +1 -1
  39. package/dist/node/{FoxitSerifBoldItalic-YCQ4CLKE.js → FoxitSerifBoldItalic-VSYHWLRM.js} +1 -1
  40. package/dist/node/{FoxitSerifItalic-CXVTCST4.js → FoxitSerifItalic-NTOPMQDD.js} +1 -1
  41. package/dist/node/{FoxitSymbol-VUGMZN5C.js → FoxitSymbol-QPUM74UN.js} +1 -1
  42. package/dist/node/{LiberationSans-Bold-XSHQQBWB.js → LiberationSans-Bold-BXFYN4PV.js} +1 -1
  43. package/dist/node/LiberationSans-Bold-VIZ4XT4N.js +9 -0
  44. package/dist/node/{LiberationSans-BoldItalic-CTAZRFRL.js → LiberationSans-BoldItalic-DQQC5TNJ.js} +1 -1
  45. package/dist/node/LiberationSans-BoldItalic-WXMOSICD.js +9 -0
  46. package/dist/node/LiberationSans-Italic-34IBVQZ4.js +9 -0
  47. package/dist/node/{LiberationSans-Italic-WIOTUKLC.js → LiberationSans-Italic-Z4MFN6PY.js} +1 -1
  48. package/dist/node/LiberationSans-Regular-JOSGNSW5.js +9 -0
  49. package/dist/node/{LiberationSans-Regular-CDMMZL5S.js → LiberationSans-Regular-MACKS2VL.js} +1 -1
  50. package/dist/node/{NodeUtils-ZGLDDB6J.js → NodeUtils-ZPPZPJWD.js} +3 -3
  51. package/dist/node/{chunk-GVC6TP3T.js → chunk-D4U3W2CD.js} +2 -2
  52. package/dist/node/{chunk-YDSKBMQ3.js → chunk-FHASHZBJ.js} +1 -1
  53. package/dist/node/{chunk-AC5JE2E3.js → chunk-GWGW2EKY.js} +2 -2
  54. package/dist/node/chunk-ZFIGV5OT.js +63 -0
  55. package/dist/node/index.js +13040 -65
  56. package/dist/node/{openjpeg-B2WN24QZ.js → openjpeg-TRZ4ANDN.js} +1 -1
  57. package/dist/node/{qcms_bg-T4RSHPOQ.js → qcms_bg-PRPVJQFC.js} +1 -1
  58. package/dist/node/worker.js +115 -6
  59. package/dist/pdf.js/external/openjpeg/openjpeg.d.ts +2 -0
  60. package/dist/pdf.js/external/qcms/qcms.d.ts +92 -0
  61. package/dist/pdf.js/external/qcms/qcms_utils.d.ts +14 -0
  62. package/dist/pdf.js/src/core/arithmetic_decoder.d.ts +21 -0
  63. package/dist/pdf.js/src/core/ascii_85_stream.d.ts +8 -0
  64. package/dist/pdf.js/src/core/ascii_hex_stream.d.ts +8 -0
  65. package/dist/pdf.js/src/core/base_stream.d.ts +32 -0
  66. package/dist/pdf.js/src/core/binary_cmap.d.ts +3 -0
  67. package/dist/pdf.js/src/core/ccitt.d.ts +72 -0
  68. package/dist/pdf.js/src/core/ccitt_stream.d.ts +9 -0
  69. package/dist/pdf.js/src/core/cff_font.d.ts +15 -0
  70. package/dist/pdf.js/src/core/cff_parser.d.ts +166 -0
  71. package/dist/pdf.js/src/core/charsets.d.ts +3 -0
  72. package/dist/pdf.js/src/core/cmap.d.ts +37 -0
  73. package/dist/pdf.js/src/core/colorspace.d.ts +177 -0
  74. package/dist/pdf.js/src/core/colorspace_utils.d.ts +21 -0
  75. package/dist/pdf.js/src/core/core_utils.d.ts +140 -0
  76. package/dist/pdf.js/src/core/decode_stream.d.ts +25 -0
  77. package/dist/pdf.js/src/core/encodings.d.ts +7 -0
  78. package/dist/pdf.js/src/core/flate_stream.d.ts +15 -0
  79. package/dist/pdf.js/src/core/font_renderer.d.ts +34 -0
  80. package/dist/pdf.js/src/core/fonts.d.ts +92 -0
  81. package/dist/pdf.js/src/core/fonts_utils.d.ts +32 -0
  82. package/dist/pdf.js/src/core/glyf.d.ts +44 -0
  83. package/dist/pdf.js/src/core/glyphlist.d.ts +2 -0
  84. package/dist/pdf.js/src/core/icc_colorspace.d.ts +22 -0
  85. package/dist/pdf.js/src/core/jbig2.d.ts +12 -0
  86. package/dist/pdf.js/src/core/jbig2_stream.d.ts +17 -0
  87. package/dist/pdf.js/src/core/jpeg_stream.d.ts +25 -0
  88. package/dist/pdf.js/src/core/jpg.d.ts +62 -0
  89. package/dist/pdf.js/src/core/jpx.d.ts +35 -0
  90. package/dist/pdf.js/src/core/jpx_stream.d.ts +17 -0
  91. package/dist/pdf.js/src/core/lzw_stream.d.ts +21 -0
  92. package/dist/pdf.js/src/core/metrics.d.ts +2 -0
  93. package/dist/pdf.js/src/core/name_number_tree.d.ts +21 -0
  94. package/dist/pdf.js/src/core/opentype_file_builder.d.ts +12 -0
  95. package/dist/pdf.js/src/core/parser.d.ts +81 -0
  96. package/dist/pdf.js/src/core/predictor_stream.d.ts +15 -0
  97. package/dist/pdf.js/src/core/primitives.d.ts +78 -0
  98. package/dist/pdf.js/src/core/run_length_stream.d.ts +7 -0
  99. package/dist/pdf.js/src/core/standard_fonts.d.ts +18 -0
  100. package/dist/pdf.js/src/core/stream.d.ts +21 -0
  101. package/dist/pdf.js/src/core/struct_tree.d.ts +92 -0
  102. package/dist/pdf.js/src/core/to_unicode_map.d.ts +21 -0
  103. package/dist/pdf.js/src/core/type1_font.d.ts +17 -0
  104. package/dist/pdf.js/src/core/type1_parser.d.ts +29 -0
  105. package/dist/pdf.js/src/core/unicode.d.ts +5 -0
  106. package/dist/pdf.js/src/display/api.d.ts +5 -5
  107. package/dist/pdf.js/src/display/display_utils.d.ts +1 -1
  108. package/dist/pdf.js/src/display/draw_layer.d.ts +2 -2
  109. package/dist/pdf.js/src/display/editor/alt_text.d.ts +1 -1
  110. package/dist/pdf.js/src/display/editor/annotation_editor_layer.d.ts +1 -1
  111. package/dist/pdf.js/src/display/editor/color_picker.d.ts +2 -2
  112. package/dist/pdf.js/src/display/editor/draw.d.ts +7 -7
  113. package/dist/pdf.js/src/display/editor/drawers/freedraw.d.ts +3 -3
  114. package/dist/pdf.js/src/display/editor/drawers/signaturedraw.d.ts +13 -13
  115. package/dist/pdf.js/src/display/editor/editor.d.ts +1 -1
  116. package/dist/pdf.js/src/display/editor/freetext.d.ts +2 -2
  117. package/dist/pdf.js/src/display/editor/highlight.d.ts +3 -3
  118. package/dist/pdf.js/src/display/editor/toolbar.d.ts +2 -2
  119. package/dist/pdf.js/src/display/text_layer.d.ts +9 -9
  120. package/dist/pdf.js/src/display/worker_options.d.ts +2 -2
  121. package/dist/pdf.js/src/shared/util.d.ts +2 -2
  122. package/dist/pdf.js/web/text_accessibility.d.ts +1 -1
  123. package/package.json +10 -1
  124. package/dist/node/chunk-7MW5RQZ5.js +0 -30
@@ -0,0 +1,32 @@
1
+ export class BaseStream {
2
+ get length(): void;
3
+ get isEmpty(): void;
4
+ get isDataLoaded(): any;
5
+ getByte(): void;
6
+ getBytes(length: any): void;
7
+ /**
8
+ * NOTE: This method can only be used to get image-data that is guaranteed
9
+ * to be fully loaded, since otherwise intermittent errors may occur;
10
+ * note the `ObjectLoader` class.
11
+ */
12
+ getImageData(length: any, decoderOptions: any): Promise<void>;
13
+ asyncGetBytes(): Promise<void>;
14
+ get isAsync(): boolean;
15
+ get isAsyncDecoder(): boolean;
16
+ get canAsyncDecodeImageFromBuffer(): boolean;
17
+ getTransferableImage(): Promise<null>;
18
+ peekByte(): void;
19
+ peekBytes(length: any): void;
20
+ getUint16(): any;
21
+ getInt32(): any;
22
+ getByteRange(begin: any, end: any): void;
23
+ getString(length: any): string;
24
+ skip(n: any): void;
25
+ reset(): void;
26
+ moveStart(): void;
27
+ makeSubStream(start: any, length: any, dict?: null): void;
28
+ /**
29
+ * @returns {Array | null}
30
+ */
31
+ getBaseStreams(): any[] | null;
32
+ }
@@ -0,0 +1,3 @@
1
+ export class BinaryCMapReader {
2
+ process(data: any, cMap: any, extend: any): Promise<any>;
3
+ }
@@ -0,0 +1,72 @@
1
+ export type CCITTFaxDecoderSource = {
2
+ /**
3
+ * - Method that return one byte of data for decoding,
4
+ * or -1 when EOF is reached.
5
+ */
6
+ next: Function;
7
+ };
8
+ /**
9
+ * @param {CCITTFaxDecoderSource} source - The data which should be decoded.
10
+ * @param {Object} [options] - Decoding options.
11
+ */
12
+ export class CCITTFaxDecoder {
13
+ constructor(source: any, options?: {});
14
+ source: any;
15
+ eof: boolean;
16
+ encoding: any;
17
+ eoline: any;
18
+ byteAlign: any;
19
+ columns: any;
20
+ rows: any;
21
+ eoblock: any;
22
+ black: any;
23
+ codingLine: Uint32Array<any>;
24
+ refLine: Uint32Array<any>;
25
+ codingPos: number;
26
+ row: number;
27
+ nextLine2D: boolean;
28
+ inputBits: number;
29
+ inputBuf: number;
30
+ outputBits: number;
31
+ rowsDone: boolean;
32
+ readNextChar(): number;
33
+ err: boolean | undefined;
34
+ /**
35
+ * @private
36
+ */
37
+ private _addPixels;
38
+ /**
39
+ * @private
40
+ */
41
+ private _addPixelsNeg;
42
+ /**
43
+ * This function returns the code found from the table.
44
+ * The start and end parameters set the boundaries for searching the table.
45
+ * The limit parameter is optional. Function returns an array with three
46
+ * values. The first array element indicates whether a valid code is being
47
+ * returned. The second array element is the actual code. The third array
48
+ * element indicates whether EOF was reached.
49
+ * @private
50
+ */
51
+ private _findTableCode;
52
+ /**
53
+ * @private
54
+ */
55
+ private _getTwoDimCode;
56
+ /**
57
+ * @private
58
+ */
59
+ private _getWhiteCode;
60
+ /**
61
+ * @private
62
+ */
63
+ private _getBlackCode;
64
+ /**
65
+ * @private
66
+ */
67
+ private _lookBits;
68
+ /**
69
+ * @private
70
+ */
71
+ private _eatBits;
72
+ }
@@ -0,0 +1,9 @@
1
+ export class CCITTFaxStream extends DecodeStream {
2
+ constructor(str: any, maybeLength: any, params: any);
3
+ str: any;
4
+ dict: any;
5
+ ccittFaxDecoder: CCITTFaxDecoder;
6
+ readBlock(): void;
7
+ }
8
+ import { DecodeStream } from "./decode_stream.js";
9
+ import { CCITTFaxDecoder } from "./ccitt.js";
@@ -0,0 +1,15 @@
1
+ export class CFFFont {
2
+ constructor(file: any, properties: any);
3
+ properties: any;
4
+ cff: import("./cff_parser.js").CFF;
5
+ seacs: any;
6
+ data: any;
7
+ get numGlyphs(): any;
8
+ getCharset(): any;
9
+ getGlyphMapping(): any;
10
+ hasGlyphId(id: any): boolean;
11
+ /**
12
+ * @private
13
+ */
14
+ private _createBuiltInEncoding;
15
+ }
@@ -0,0 +1,166 @@
1
+ export class CFF {
2
+ header: any;
3
+ names: any[];
4
+ topDict: any;
5
+ strings: CFFStrings;
6
+ globalSubrIndex: any;
7
+ encoding: any;
8
+ charset: any;
9
+ charStrings: any;
10
+ fdArray: any[];
11
+ fdSelect: any;
12
+ isCIDFont: boolean;
13
+ duplicateFirstGlyph(): void;
14
+ hasGlyphId(id: any): boolean;
15
+ }
16
+ export class CFFCharset {
17
+ constructor(predefined: any, format: any, charset: any, raw: any);
18
+ predefined: any;
19
+ format: any;
20
+ charset: any;
21
+ raw: any;
22
+ }
23
+ export class CFFCompiler {
24
+ static get EncodeFloatRegExp(): any;
25
+ constructor(cff: any);
26
+ cff: any;
27
+ compile(): never[];
28
+ encodeNumber(value: any): any[];
29
+ encodeFloat(num: any): number[];
30
+ encodeInteger(value: any): any[];
31
+ compileHeader(header: any): any[];
32
+ compileNameIndex(names: any): number[];
33
+ compileTopDicts(dicts: any, length: any, removeCidKeys: any): {
34
+ trackers: CFFOffsetTracker[];
35
+ output: CFFIndex;
36
+ };
37
+ compilePrivateDicts(dicts: any, trackers: any, output: any): void;
38
+ compileDict(dict: any, offsetTracker: any): any[];
39
+ compileStringIndex(strings: any): number[];
40
+ compileCharStrings(charStrings: any): number[];
41
+ compileCharset(charset: any, numGlyphs: any, strings: any, isCIDFont: any): any[];
42
+ compileEncoding(encoding: any): any[];
43
+ compileFDSelect(fdSelect: any): any[];
44
+ compileTypedArray(data: any): any[];
45
+ compileIndex(index: any, trackers?: any[]): number[];
46
+ }
47
+ export class CFFFDSelect {
48
+ constructor(format: any, fdSelect: any);
49
+ format: any;
50
+ fdSelect: any;
51
+ getFDIndex(glyphIndex: any): any;
52
+ }
53
+ export class CFFHeader {
54
+ constructor(major: any, minor: any, hdrSize: any, offSize: any);
55
+ major: any;
56
+ minor: any;
57
+ hdrSize: any;
58
+ offSize: any;
59
+ }
60
+ export class CFFIndex {
61
+ objects: any[];
62
+ length: number;
63
+ add(data: any): void;
64
+ set(index: any, data: any): void;
65
+ get(index: any): any;
66
+ get count(): number;
67
+ }
68
+ export class CFFParser {
69
+ constructor(file: any, properties: any, seacAnalysisEnabled: any);
70
+ bytes: any;
71
+ properties: any;
72
+ seacAnalysisEnabled: boolean;
73
+ parse(): CFF;
74
+ cff: CFF | undefined;
75
+ parseHeader(): {
76
+ obj: CFFHeader;
77
+ endPos: any;
78
+ };
79
+ parseDict(dict: any): any[][];
80
+ parseIndex(pos: any): {
81
+ obj: CFFIndex;
82
+ endPos: any;
83
+ };
84
+ parseNameIndex(index: any): string[];
85
+ parseStringIndex(index: any): CFFStrings;
86
+ createDict(Type: any, dict: any, strings: any): any;
87
+ parseCharString(state: any, data: any, localSubrIndex: any, globalSubrIndex: any): boolean;
88
+ parseCharStrings({ charStrings, localSubrIndex, globalSubrIndex, fdSelect, fdArray, privateDict, }: {
89
+ charStrings: any;
90
+ localSubrIndex: any;
91
+ globalSubrIndex: any;
92
+ fdSelect: any;
93
+ fdArray: any;
94
+ privateDict: any;
95
+ }): {
96
+ charStrings: any;
97
+ seacs: any[];
98
+ widths: any[];
99
+ };
100
+ emptyPrivateDictionary(parentDict: any): void;
101
+ parsePrivateDict(parentDict: any): void;
102
+ parseCharsets(pos: any, length: any, strings: any, cid: any): CFFCharset;
103
+ parseEncoding(pos: any, properties: any, strings: any, charset: any): CFFEncoding;
104
+ parseFDSelect(pos: any, length: any): CFFFDSelect;
105
+ }
106
+ export class CFFPrivateDict extends CFFDict {
107
+ static get tables(): any;
108
+ constructor(strings: any);
109
+ subrsIndex: any;
110
+ }
111
+ /**
112
+ * The CFF class takes a Type1 file and wrap it into a
113
+ * 'Compact Font Format' which itself embed Type2 charstrings.
114
+ */
115
+ export const CFFStandardStrings: string[];
116
+ export class CFFStrings {
117
+ strings: any[];
118
+ get(index: any): any;
119
+ getSID(str: any): number;
120
+ add(value: any): void;
121
+ get count(): number;
122
+ }
123
+ export class CFFTopDict extends CFFDict {
124
+ static get tables(): any;
125
+ constructor(strings: any);
126
+ privateDict: any;
127
+ }
128
+ declare class CFFOffsetTracker {
129
+ offsets: any;
130
+ isTracking(key: any): boolean;
131
+ track(key: any, location: any): void;
132
+ offset(value: any): void;
133
+ setEntryLocation(key: any, values: any, output: any): void;
134
+ }
135
+ declare class CFFEncoding {
136
+ constructor(predefined: any, format: any, encoding: any, raw: any);
137
+ predefined: any;
138
+ format: any;
139
+ encoding: any;
140
+ raw: any;
141
+ }
142
+ declare class CFFDict {
143
+ static createTables(layout: any): {
144
+ keyToNameMap: {};
145
+ nameToKeyMap: {};
146
+ defaults: {};
147
+ types: {};
148
+ opcodes: {};
149
+ order: never[];
150
+ };
151
+ constructor(tables: any, strings: any);
152
+ keyToNameMap: any;
153
+ nameToKeyMap: any;
154
+ defaults: any;
155
+ types: any;
156
+ opcodes: any;
157
+ order: any;
158
+ strings: any;
159
+ values: any;
160
+ setByKey(key: any, value: any): boolean;
161
+ setByName(name: any, value: any): void;
162
+ hasName(name: any): boolean;
163
+ getByName(name: any): any;
164
+ removeByName(name: any): void;
165
+ }
166
+ export {};
@@ -0,0 +1,3 @@
1
+ export const ExpertCharset: string[];
2
+ export const ExpertSubsetCharset: string[];
3
+ export const ISOAdobeCharset: string[];
@@ -0,0 +1,37 @@
1
+ export class CMap {
2
+ constructor(builtInCMap?: boolean);
3
+ codespaceRanges: never[][];
4
+ numCodespaceRanges: number;
5
+ _map: any[];
6
+ name: string;
7
+ vertical: boolean;
8
+ useCMap: any;
9
+ builtInCMap: boolean;
10
+ addCodespaceRange(n: any, low: any, high: any): void;
11
+ mapCidRange(low: any, high: any, dstLow: any): void;
12
+ mapBfRange(low: any, high: any, dstLow: any): void;
13
+ mapBfRangeToArray(low: any, high: any, array: any): void;
14
+ mapOne(src: any, dst: any): void;
15
+ lookup(code: any): any;
16
+ contains(code: any): boolean;
17
+ forEach(callback: any): void;
18
+ charCodeOf(value: any): number;
19
+ getMap(): any[];
20
+ readCharCode(str: any, offset: any, out: any): void;
21
+ getCharCodeLength(charCode: any): number;
22
+ get length(): number;
23
+ get isIdentityCMap(): boolean;
24
+ }
25
+ export class CMapFactory {
26
+ static create({ encoding, fetchBuiltInCMap, useCMap }: {
27
+ encoding: any;
28
+ fetchBuiltInCMap: any;
29
+ useCMap: any;
30
+ }): Promise<any>;
31
+ }
32
+ export class IdentityCMap extends CMap {
33
+ constructor(vertical: any, n: any);
34
+ vertical: any;
35
+ charCodeOf(value: any): any;
36
+ get isIdentityCMap(): void;
37
+ }
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Alternate color space handles both Separation and DeviceN color spaces. A
3
+ * Separation color space is actually just a DeviceN with one color component.
4
+ * Both color spaces use a tinting function to convert colors to a base color
5
+ * space.
6
+ *
7
+ * The default color is `new Float32Array(new Array(numComps).fill(1))`.
8
+ */
9
+ export class AlternateCS extends ColorSpace {
10
+ constructor(numComps: any, base: any, tintFn: any);
11
+ base: any;
12
+ tintFn: any;
13
+ tmpBuf: Float32Array<any>;
14
+ getOutputLength(inputLength: any, alpha01: any): any;
15
+ }
16
+ /**
17
+ * CalGrayCS: Based on "PDF Reference, Sixth Ed", p.245
18
+ *
19
+ * The default color is `new Float32Array([0])`.
20
+ */
21
+ export class CalGrayCS extends ColorSpace {
22
+ constructor(whitePoint: any, blackPoint: any, gamma: any);
23
+ G: any;
24
+ XB: any;
25
+ YB: any;
26
+ ZB: any;
27
+ getOutputLength(inputLength: any, alpha01: any): number;
28
+ #private;
29
+ }
30
+ /**
31
+ * CalRGBCS: Based on "PDF Reference, Sixth Ed", p.247
32
+ *
33
+ * The default color is `new Float32Array([0, 0, 0])`.
34
+ */
35
+ export class CalRGBCS extends ColorSpace {
36
+ static "__#private@#BRADFORD_SCALE_MATRIX": Float32Array<ArrayBuffer>;
37
+ static "__#private@#BRADFORD_SCALE_INVERSE_MATRIX": Float32Array<ArrayBuffer>;
38
+ static "__#private@#SRGB_D65_XYZ_TO_RGB_MATRIX": Float32Array<ArrayBuffer>;
39
+ static "__#private@#FLAT_WHITEPOINT_MATRIX": Float32Array<ArrayBuffer>;
40
+ static "__#private@#tempNormalizeMatrix": Float32Array<ArrayBuffer>;
41
+ static "__#private@#tempConvertMatrix1": Float32Array<ArrayBuffer>;
42
+ static "__#private@#tempConvertMatrix2": Float32Array<ArrayBuffer>;
43
+ static "__#private@#DECODE_L_CONSTANT": number;
44
+ constructor(whitePoint: any, blackPoint: any, gamma: any, matrix: any);
45
+ whitePoint: any;
46
+ blackPoint: any;
47
+ GR: any;
48
+ GG: any;
49
+ GB: any;
50
+ getOutputLength(inputLength: any, alpha01: any): number;
51
+ #private;
52
+ }
53
+ export class ColorSpace {
54
+ static "__#private@#rgbBuf": Uint8ClampedArray<ArrayBuffer>;
55
+ /**
56
+ * Checks if a decode map matches the default decode map for a color space.
57
+ * This handles the general decode maps where there are two values per
58
+ * component, e.g. [0, 1, 0, 1, 0, 1] for a RGB color.
59
+ * This does not handle Lab, Indexed, or Pattern decode maps since they are
60
+ * slightly different.
61
+ * @param {Array} decode - Decode map (usually from an image).
62
+ * @param {number} numComps - Number of components the color space has.
63
+ */
64
+ static isDefaultDecode(decode: any[], numComps: number): boolean;
65
+ constructor(name: any, numComps: any);
66
+ name: any;
67
+ numComps: any;
68
+ /**
69
+ * Converts the color value to the RGB color. The color components are
70
+ * located in the src array starting from the srcOffset. Returns the array
71
+ * of the rgb components, each value ranging from [0,255].
72
+ */
73
+ getRgb(src: any, srcOffset: any, output?: Uint8ClampedArray<ArrayBuffer>): Uint8ClampedArray<ArrayBuffer>;
74
+ getRgbHex(src: any, srcOffset: any): string;
75
+ /**
76
+ * Converts the color value to the RGB color, similar to the getRgb method.
77
+ * The result placed into the dest array starting from the destOffset.
78
+ */
79
+ getRgbItem(src: any, srcOffset: any, dest: any, destOffset: any): void;
80
+ /**
81
+ * Converts the specified number of the color values to the RGB colors.
82
+ * The colors are located in the src array starting from the srcOffset.
83
+ * The result is placed into the dest array starting from the destOffset.
84
+ * The src array items shall be in [0,2^bits) range, the dest array items
85
+ * will be in [0,255] range. alpha01 indicates how many alpha components
86
+ * there are in the dest array; it will be either 0 (RGB array) or 1 (RGBA
87
+ * array).
88
+ */
89
+ getRgbBuffer(src: any, srcOffset: any, count: any, dest: any, destOffset: any, bits: any, alpha01: any): void;
90
+ /**
91
+ * Determines the number of bytes required to store the result of the
92
+ * conversion done by the getRgbBuffer method. As in getRgbBuffer,
93
+ * |alpha01| is either 0 (RGB output) or 1 (RGBA output).
94
+ */
95
+ getOutputLength(inputLength: any, alpha01: any): void;
96
+ /**
97
+ * Returns true if source data will be equal the result/output data.
98
+ */
99
+ isPassthrough(bits: any): boolean;
100
+ /**
101
+ * Refer to the static `ColorSpace.isDefaultDecode` method below.
102
+ */
103
+ isDefaultDecode(decodeMap: any, bpc: any): boolean;
104
+ /**
105
+ * Fills in the RGB colors in the destination buffer. alpha01 indicates
106
+ * how many alpha components there are in the dest array; it will be either
107
+ * 0 (RGB array) or 1 (RGBA array).
108
+ */
109
+ fillRgb(dest: any, originalWidth: any, originalHeight: any, width: any, height: any, actualHeight: any, bpc: any, comps: any, alpha01: any): void;
110
+ /**
111
+ * True if the colorspace has components in the default range of [0, 1].
112
+ * This should be true for all colorspaces except for lab color spaces
113
+ * which are [0,100], [-128, 127], [-128, 127].
114
+ */
115
+ get usesZeroToOneRange(): any;
116
+ }
117
+ /**
118
+ * The default color is `new Float32Array([0, 0, 0, 1])`.
119
+ */
120
+ export class DeviceCmykCS extends ColorSpace {
121
+ constructor();
122
+ getOutputLength(inputLength: any, alpha01: any): number;
123
+ #private;
124
+ }
125
+ /**
126
+ * The default color is `new Float32Array([0])`.
127
+ */
128
+ export class DeviceGrayCS extends ColorSpace {
129
+ constructor();
130
+ getOutputLength(inputLength: any, alpha01: any): number;
131
+ }
132
+ /**
133
+ * The default color is `new Float32Array([0, 0, 0, 1])`.
134
+ */
135
+ export class DeviceRgbaCS extends ColorSpace {
136
+ constructor();
137
+ getOutputLength(inputLength: any, _alpha01: any): number;
138
+ }
139
+ /**
140
+ * The default color is `new Float32Array([0, 0, 0])`.
141
+ */
142
+ export class DeviceRgbCS extends ColorSpace {
143
+ constructor();
144
+ getOutputLength(inputLength: any, alpha01: any): number;
145
+ }
146
+ /**
147
+ * The default color is `new Uint8Array([0])`.
148
+ */
149
+ export class IndexedCS extends ColorSpace {
150
+ constructor(base: any, highVal: any, lookup: any);
151
+ base: any;
152
+ highVal: any;
153
+ lookup: Uint8Array<ArrayBuffer>;
154
+ getOutputLength(inputLength: any, alpha01: any): any;
155
+ }
156
+ /**
157
+ * LabCS: Based on "PDF Reference, Sixth Ed", p.250
158
+ *
159
+ * The default color is `new Float32Array([0, 0, 0])`.
160
+ */
161
+ export class LabCS extends ColorSpace {
162
+ constructor(whitePoint: any, blackPoint: any, range: any);
163
+ XB: any;
164
+ YB: any;
165
+ ZB: any;
166
+ amin: any;
167
+ amax: any;
168
+ bmin: any;
169
+ bmax: any;
170
+ getOutputLength(inputLength: any, alpha01: any): number;
171
+ #private;
172
+ }
173
+ export class PatternCS extends ColorSpace {
174
+ constructor(baseCS: any);
175
+ base: any;
176
+ isDefaultDecode(decodeMap: any, bpc: any): void;
177
+ }
@@ -0,0 +1,21 @@
1
+ export class ColorSpaceUtils {
2
+ static parse({ cs, xref, resources, pdfFunctionFactory, globalColorSpaceCache, localColorSpaceCache, asyncIfNotCached, }: {
3
+ cs: any;
4
+ xref: any;
5
+ resources?: null | undefined;
6
+ pdfFunctionFactory: any;
7
+ globalColorSpaceCache: any;
8
+ localColorSpaceCache: any;
9
+ asyncIfNotCached?: boolean | undefined;
10
+ }): any;
11
+ /**
12
+ * NOTE: This method should *only* be invoked from `this.#parse`,
13
+ * when parsing "sub" ColorSpaces.
14
+ */
15
+ static "__#private@#subParse"(cs: any, options: any): any;
16
+ static "__#private@#parse"(cs: any, options: any): any;
17
+ static get gray(): any;
18
+ static get rgb(): any;
19
+ static get rgba(): any;
20
+ static get cmyk(): any;
21
+ }
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Combines multiple ArrayBuffers into a single Uint8Array.
3
+ * @param {Array<ArrayBuffer>} arr - An array of ArrayBuffers.
4
+ * @returns {Uint8Array}
5
+ */
6
+ export function arrayBuffersToBytes(arr: Array<ArrayBuffer>): Uint8Array;
7
+ export function codePointIter(str: any): Generator<any, void, unknown>;
8
+ export function collectActions(xref: any, dict: any, eventType: any): any;
9
+ export function encodeToXmlString(str: any): any;
10
+ export function escapePDFName(str: any): any;
11
+ export function escapeString(str: any): any;
12
+ export function fetchBinaryData(url: any): Promise<Uint8Array<ArrayBuffer>>;
13
+ /**
14
+ * Get the value of an inheritable property.
15
+ *
16
+ * If the PDF specification explicitly lists a property in a dictionary as
17
+ * inheritable, then the value of the property may be present in the dictionary
18
+ * itself or in one or more parents of the dictionary.
19
+ *
20
+ * If the key is not found in the tree, `undefined` is returned. Otherwise,
21
+ * the value for the key is returned or, if `stopWhenFound` is `false`, a list
22
+ * of values is returned.
23
+ *
24
+ * @param {Dict} dict - Dictionary from where to start the traversal.
25
+ * @param {string} key - The key of the property to find the value for.
26
+ * @param {boolean} getArray - Whether or not the value should be fetched as an
27
+ * array. The default value is `false`.
28
+ * @param {boolean} stopWhenFound - Whether or not to stop the traversal when
29
+ * the key is found. If set to `false`, we always walk up the entire parent
30
+ * chain, for example to be able to find `\Resources` placed on multiple
31
+ * levels of the tree. The default value is `true`.
32
+ */
33
+ export function getInheritableProperty({ dict, key, getArray, stopWhenFound, }: Dict): any;
34
+ export function getLookupTableFactory(initializer: any): () => any;
35
+ export function getNewAnnotationsMap(annotationStorage: any): Map<any, any> | null;
36
+ /**
37
+ * Get the parent dictionary to update when a property is set.
38
+ *
39
+ * @param {Dict} dict - Dictionary from where to start the traversal.
40
+ * @param {Ref} ref - The reference to the dictionary.
41
+ * @param {XRef} xref - The `XRef` instance.
42
+ */
43
+ export function getParentToUpdate(dict: Dict, ref: Ref, xref: XRef): {
44
+ dict: null;
45
+ ref: null;
46
+ };
47
+ export function getRotationMatrix(rotation: any, width: any, height: any): any[];
48
+ /**
49
+ * Get the number of bytes to use to represent the given positive integer.
50
+ * If n is zero, the function returns 0 which means that we don't need to waste
51
+ * a byte to represent it.
52
+ * @param {number} x - a positive integer.
53
+ * @returns {number}
54
+ */
55
+ export function getSizeInBytes(x: number): number;
56
+ export const IDENTITY_MATRIX: number[];
57
+ export function isAscii(str: any): boolean;
58
+ /**
59
+ * Checks if something is an Array containing only boolean values,
60
+ * and (optionally) checks its length.
61
+ * @param {any} arr
62
+ * @param {number | null} len
63
+ * @returns {boolean}
64
+ */
65
+ export function isBooleanArray(arr: any, len: number | null): boolean;
66
+ /**
67
+ * Checks if something is an Array containing only numbers,
68
+ * and (optionally) checks its length.
69
+ * @param {any} arr
70
+ * @param {number | null} len
71
+ * @returns {boolean}
72
+ */
73
+ export function isNumberArray(arr: any, len: number | null): boolean;
74
+ export function isWhiteSpace(ch: any): boolean;
75
+ export function log2(x: any): number;
76
+ export function lookupMatrix(arr: any, fallback: any): any;
77
+ export function lookupNormalRect(arr: any, fallback: any): any;
78
+ export function lookupRect(arr: any, fallback: any): any;
79
+ export const MAX_INT_32: number;
80
+ export const MIN_INT_32: number;
81
+ declare const MissingDataException_base: any;
82
+ export class MissingDataException extends MissingDataException_base {
83
+ [x: string]: any;
84
+ constructor(begin: any, end: any);
85
+ begin: any;
86
+ end: any;
87
+ }
88
+ export function numberToString(value: any): any;
89
+ declare const ParserEOFException_base: any;
90
+ export class ParserEOFException extends ParserEOFException_base {
91
+ [x: string]: any;
92
+ constructor(msg: any);
93
+ }
94
+ /**
95
+ * AcroForm field names use an array like notation to refer to
96
+ * repeated XFA elements e.g. foo.bar[nnn].
97
+ * see: XFA Spec Chapter 3 - Repeated Elements
98
+ *
99
+ * @param {string} path - XFA path name.
100
+ * @returns {Array} - Array of Objects with the name and pos of
101
+ * each part of the path.
102
+ */
103
+ export function parseXFAPath(path: string): any[];
104
+ export const PDF_VERSION_REGEXP: RegExp;
105
+ export function readInt16(data: any, offset: any): number;
106
+ export function readInt8(data: any, offset: any): number;
107
+ export function readUint16(data: any, offset: any): number;
108
+ export function readUint32(data: any, offset: any): number;
109
+ export function recoverJsURL(str: any): {
110
+ url: string;
111
+ newWindow: boolean;
112
+ } | null;
113
+ export const RESOURCES_KEYS_OPERATOR_LIST: string[];
114
+ export const RESOURCES_KEYS_TEXT_CONTENT: string[];
115
+ export function stringToAsciiOrUTF16BE(str: any): any;
116
+ export function stringToUTF16HexString(str: any): string;
117
+ export function stringToUTF16String(str: any, bigEndian?: boolean): string;
118
+ /**
119
+ * Converts positive integers to (upper case) Roman numerals.
120
+ * @param {number} number - The number that should be converted.
121
+ * @param {boolean} lowerCase - Indicates if the result should be converted
122
+ * to lower case letters. The default value is `false`.
123
+ * @returns {string} The resulting Roman number.
124
+ */
125
+ export function toRomanNumerals(number: number, lowerCase?: boolean): string;
126
+ export function validateCSSFont(cssFontInfo: any): boolean;
127
+ export function validateFontName(fontFamily: any, mustWarn?: boolean): boolean;
128
+ declare const XRefEntryException_base: any;
129
+ export class XRefEntryException extends XRefEntryException_base {
130
+ [x: string]: any;
131
+ constructor(msg: any);
132
+ }
133
+ declare const XRefParseException_base: any;
134
+ export class XRefParseException extends XRefParseException_base {
135
+ [x: string]: any;
136
+ constructor(msg: any);
137
+ }
138
+ import { Dict } from "./primitives.js";
139
+ import { Ref } from "./primitives.js";
140
+ export {};