@chialab/pdfjs-lib 1.0.0-alpha.27 → 1.0.0-alpha.29
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/{FoxitDingbats-SB6TO3S5.js → FoxitDingbats-XZTZYAP6.js} +1 -1
- package/dist/browser/{FoxitFixed-UIGSMBQB.js → FoxitFixed-DRWD6QNM.js} +1 -1
- package/dist/browser/{FoxitFixedBold-2PAEIZAT.js → FoxitFixedBold-A3IBPIFC.js} +1 -1
- package/dist/browser/{FoxitFixedBoldItalic-OSQUQDEE.js → FoxitFixedBoldItalic-V4ORMFGL.js} +1 -1
- package/dist/browser/{FoxitFixedItalic-W73RDK22.js → FoxitFixedItalic-Z7BSNTJA.js} +1 -1
- package/dist/browser/{FoxitSerif-3HH3SOZF.js → FoxitSerif-Y34FHWHO.js} +1 -1
- package/dist/browser/{FoxitSerifBold-HXP2QOO7.js → FoxitSerifBold-NCWBT4GX.js} +1 -1
- package/dist/browser/{FoxitSerifBoldItalic-FZXLNWD7.js → FoxitSerifBoldItalic-YTEOG5ZU.js} +1 -1
- package/dist/browser/{FoxitSerifItalic-WQFHUBI2.js → FoxitSerifItalic-3H547RIJ.js} +1 -1
- package/dist/browser/{FoxitSymbol-OVWU7LKS.js → FoxitSymbol-EMTQEYPB.js} +1 -1
- package/dist/browser/{LiberationSans-Bold-GSJN42N5.js → LiberationSans-Bold-MGX34QV4.js} +1 -1
- package/dist/browser/LiberationSans-Bold-PQY5JZAT.js +9 -0
- package/dist/browser/LiberationSans-BoldItalic-PBNZJX4S.js +9 -0
- package/dist/browser/{LiberationSans-BoldItalic-UCPQJ3L2.js → LiberationSans-BoldItalic-WSEQ5LH5.js} +1 -1
- package/dist/browser/{LiberationSans-Italic-6CIHEALY.js → LiberationSans-Italic-E4SLDR4M.js} +1 -1
- package/dist/browser/LiberationSans-Italic-NAYVQTNG.js +9 -0
- package/dist/browser/{LiberationSans-Regular-KIF3IRJY.js → LiberationSans-Regular-3SH5NGZO.js} +1 -1
- package/dist/browser/LiberationSans-Regular-FMNBW2LE.js +9 -0
- package/dist/browser/{NodeUtilsStabs-MUAXKISB.js → NodeUtilsStabs-AQQCOPNR.js} +1 -1
- package/dist/browser/{chunk-O4UKW7AD.js → chunk-7YYVRRNF.js} +5 -0
- package/dist/browser/{chunk-YWSFNHP3.js → chunk-W35PJZ6L.js} +1 -1
- package/dist/browser/index.js +13323 -526
- package/dist/browser/{openjpeg-K2XBCFFN.js → openjpeg-QLA762TL.js} +1 -1
- package/dist/browser/{qcms_bg-Q7BRLLZG.js → qcms_bg-BCJEADMU.js} +1 -1
- package/dist/browser/worker.js +114 -5
- package/dist/index.d.ts +9 -2
- package/dist/lib/Canvas.d.ts +0 -5
- package/dist/lib/StructTreePage.d.ts +5 -0
- package/dist/lib/TextLayer.d.ts +32 -5
- package/dist/lib/TextLayer_v2.d.ts +8 -0
- package/dist/node/{FoxitDingbats-65AZ2Z2V.js → FoxitDingbats-UZC34T4F.js} +1 -1
- package/dist/node/{FoxitFixed-OZGLVVOQ.js → FoxitFixed-DSJVG3IJ.js} +1 -1
- package/dist/node/{FoxitFixedBold-37OOYMV7.js → FoxitFixedBold-YSX4X5NA.js} +1 -1
- package/dist/node/{FoxitFixedBoldItalic-XYFHEG2V.js → FoxitFixedBoldItalic-IFYYA6RR.js} +1 -1
- package/dist/node/{FoxitFixedItalic-MM7OSGS6.js → FoxitFixedItalic-4PEFPCQV.js} +1 -1
- package/dist/node/{FoxitSerif-MLMJQPRP.js → FoxitSerif-7SSP2H2U.js} +1 -1
- package/dist/node/{FoxitSerifBold-AC7RJQWJ.js → FoxitSerifBold-KLMURJ6N.js} +1 -1
- package/dist/node/{FoxitSerifBoldItalic-YCQ4CLKE.js → FoxitSerifBoldItalic-VSYHWLRM.js} +1 -1
- package/dist/node/{FoxitSerifItalic-CXVTCST4.js → FoxitSerifItalic-NTOPMQDD.js} +1 -1
- package/dist/node/{FoxitSymbol-VUGMZN5C.js → FoxitSymbol-QPUM74UN.js} +1 -1
- package/dist/node/{LiberationSans-Bold-XSHQQBWB.js → LiberationSans-Bold-BXFYN4PV.js} +1 -1
- package/dist/node/LiberationSans-Bold-VIZ4XT4N.js +9 -0
- package/dist/node/{LiberationSans-BoldItalic-CTAZRFRL.js → LiberationSans-BoldItalic-DQQC5TNJ.js} +1 -1
- package/dist/node/LiberationSans-BoldItalic-WXMOSICD.js +9 -0
- package/dist/node/LiberationSans-Italic-34IBVQZ4.js +9 -0
- package/dist/node/{LiberationSans-Italic-WIOTUKLC.js → LiberationSans-Italic-Z4MFN6PY.js} +1 -1
- package/dist/node/LiberationSans-Regular-JOSGNSW5.js +9 -0
- package/dist/node/{LiberationSans-Regular-CDMMZL5S.js → LiberationSans-Regular-MACKS2VL.js} +1 -1
- package/dist/node/{NodeUtils-ZGLDDB6J.js → NodeUtils-ZPPZPJWD.js} +3 -3
- package/dist/node/{chunk-GVC6TP3T.js → chunk-D4U3W2CD.js} +2 -2
- package/dist/node/{chunk-YDSKBMQ3.js → chunk-FHASHZBJ.js} +1 -1
- package/dist/node/{chunk-AC5JE2E3.js → chunk-GWGW2EKY.js} +2 -2
- package/dist/node/chunk-ZFIGV5OT.js +63 -0
- package/dist/node/index.js +13756 -930
- package/dist/node/{openjpeg-B2WN24QZ.js → openjpeg-TRZ4ANDN.js} +1 -1
- package/dist/node/{qcms_bg-T4RSHPOQ.js → qcms_bg-PRPVJQFC.js} +1 -1
- package/dist/node/worker.js +115 -6
- package/dist/pdf.js/external/openjpeg/openjpeg.d.ts +2 -0
- package/dist/pdf.js/external/qcms/qcms.d.ts +92 -0
- package/dist/pdf.js/external/qcms/qcms_utils.d.ts +14 -0
- package/dist/pdf.js/src/core/arithmetic_decoder.d.ts +21 -0
- package/dist/pdf.js/src/core/ascii_85_stream.d.ts +8 -0
- package/dist/pdf.js/src/core/ascii_hex_stream.d.ts +8 -0
- package/dist/pdf.js/src/core/base_stream.d.ts +32 -0
- package/dist/pdf.js/src/core/binary_cmap.d.ts +3 -0
- package/dist/pdf.js/src/core/ccitt.d.ts +72 -0
- package/dist/pdf.js/src/core/ccitt_stream.d.ts +9 -0
- package/dist/pdf.js/src/core/cff_font.d.ts +15 -0
- package/dist/pdf.js/src/core/cff_parser.d.ts +166 -0
- package/dist/pdf.js/src/core/charsets.d.ts +3 -0
- package/dist/pdf.js/src/core/cmap.d.ts +37 -0
- package/dist/pdf.js/src/core/colorspace.d.ts +177 -0
- package/dist/pdf.js/src/core/colorspace_utils.d.ts +21 -0
- package/dist/pdf.js/src/core/core_utils.d.ts +140 -0
- package/dist/pdf.js/src/core/decode_stream.d.ts +25 -0
- package/dist/pdf.js/src/core/encodings.d.ts +7 -0
- package/dist/pdf.js/src/core/flate_stream.d.ts +15 -0
- package/dist/pdf.js/src/core/font_renderer.d.ts +34 -0
- package/dist/pdf.js/src/core/fonts.d.ts +92 -0
- package/dist/pdf.js/src/core/fonts_utils.d.ts +32 -0
- package/dist/pdf.js/src/core/glyf.d.ts +44 -0
- package/dist/pdf.js/src/core/glyphlist.d.ts +2 -0
- package/dist/pdf.js/src/core/icc_colorspace.d.ts +22 -0
- package/dist/pdf.js/src/core/jbig2.d.ts +12 -0
- package/dist/pdf.js/src/core/jbig2_stream.d.ts +17 -0
- package/dist/pdf.js/src/core/jpeg_stream.d.ts +25 -0
- package/dist/pdf.js/src/core/jpg.d.ts +62 -0
- package/dist/pdf.js/src/core/jpx.d.ts +35 -0
- package/dist/pdf.js/src/core/jpx_stream.d.ts +17 -0
- package/dist/pdf.js/src/core/lzw_stream.d.ts +21 -0
- package/dist/pdf.js/src/core/metrics.d.ts +2 -0
- package/dist/pdf.js/src/core/name_number_tree.d.ts +21 -0
- package/dist/pdf.js/src/core/opentype_file_builder.d.ts +12 -0
- package/dist/pdf.js/src/core/parser.d.ts +81 -0
- package/dist/pdf.js/src/core/predictor_stream.d.ts +15 -0
- package/dist/pdf.js/src/core/primitives.d.ts +78 -0
- package/dist/pdf.js/src/core/run_length_stream.d.ts +7 -0
- package/dist/pdf.js/src/core/standard_fonts.d.ts +18 -0
- package/dist/pdf.js/src/core/stream.d.ts +21 -0
- package/dist/pdf.js/src/core/struct_tree.d.ts +92 -0
- package/dist/pdf.js/src/core/to_unicode_map.d.ts +21 -0
- package/dist/pdf.js/src/core/type1_font.d.ts +17 -0
- package/dist/pdf.js/src/core/type1_parser.d.ts +29 -0
- package/dist/pdf.js/src/core/unicode.d.ts +5 -0
- package/dist/pdf.js/src/display/api.d.ts +5 -5
- package/dist/pdf.js/src/display/display_utils.d.ts +1 -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 +1 -1
- package/dist/pdf.js/src/display/editor/color_picker.d.ts +2 -2
- 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 +1 -1
- package/dist/pdf.js/src/display/editor/freetext.d.ts +2 -2
- package/dist/pdf.js/src/display/editor/highlight.d.ts +3 -3
- package/dist/pdf.js/src/display/editor/toolbar.d.ts +2 -2
- 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/shared/util.d.ts +2 -2
- package/dist/pdf.js/web/text_accessibility.d.ts +1 -1
- package/package.json +10 -1
- package/dist/node/chunk-7MW5RQZ5.js +0 -30
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class DecodeStream extends BaseStream {
|
|
2
|
+
constructor(maybeMinBufferLength: any);
|
|
3
|
+
_rawMinBufferLength: any;
|
|
4
|
+
pos: number;
|
|
5
|
+
bufferLength: number;
|
|
6
|
+
eof: boolean;
|
|
7
|
+
buffer: Uint8Array<ArrayBuffer>;
|
|
8
|
+
minBufferLength: number;
|
|
9
|
+
get isEmpty(): boolean;
|
|
10
|
+
ensureBuffer(requested: any): Uint8Array<ArrayBuffer>;
|
|
11
|
+
getByte(): number;
|
|
12
|
+
getBytes(length: any, decoderOptions?: null): Uint8Array<ArrayBuffer>;
|
|
13
|
+
getImageData(length: any, decoderOptions: any): Promise<any>;
|
|
14
|
+
makeSubStream(start: any, length: any, dict?: null): Stream;
|
|
15
|
+
getBaseStreams(): any;
|
|
16
|
+
}
|
|
17
|
+
export class StreamsSequenceStream extends DecodeStream {
|
|
18
|
+
constructor(streams: any, onError?: null);
|
|
19
|
+
streams: any;
|
|
20
|
+
_onError: any;
|
|
21
|
+
readBlock(): void;
|
|
22
|
+
getBaseStreams(): any[] | null;
|
|
23
|
+
}
|
|
24
|
+
import { BaseStream } from "./base_stream.js";
|
|
25
|
+
import { Stream } from "./stream.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const ExpertEncoding: string[];
|
|
2
|
+
export function getEncoding(encodingName: any): string[] | null;
|
|
3
|
+
export const MacRomanEncoding: string[];
|
|
4
|
+
export const StandardEncoding: string[];
|
|
5
|
+
export const SymbolSetEncoding: string[];
|
|
6
|
+
export const WinAnsiEncoding: string[];
|
|
7
|
+
export const ZapfDingbatsEncoding: string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class FlateStream extends DecodeStream {
|
|
2
|
+
constructor(str: any, maybeLength: any);
|
|
3
|
+
str: any;
|
|
4
|
+
dict: any;
|
|
5
|
+
codeSize: number;
|
|
6
|
+
codeBuf: number;
|
|
7
|
+
getImageData(length: any, _decoderOptions: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
8
|
+
asyncGetBytes(): Promise<Uint8Array<ArrayBuffer> | null>;
|
|
9
|
+
getBits(bits: any): number;
|
|
10
|
+
getCode(table: any): number;
|
|
11
|
+
generateHuffmanTable(lengths: any): (number | Int32Array<ArrayBuffer>)[];
|
|
12
|
+
readBlock(): void;
|
|
13
|
+
#private;
|
|
14
|
+
}
|
|
15
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class FontRendererFactory {
|
|
2
|
+
static create(font: any, seacAnalysisEnabled: any): TrueTypeCompiled | Type2Compiled;
|
|
3
|
+
}
|
|
4
|
+
declare class TrueTypeCompiled extends CompiledFont {
|
|
5
|
+
constructor(glyphs: any, cmap: any, fontMatrix: any);
|
|
6
|
+
glyphs: any;
|
|
7
|
+
cmap: any;
|
|
8
|
+
compileGlyphImpl(code: any, cmds: any): void;
|
|
9
|
+
}
|
|
10
|
+
declare class Type2Compiled extends CompiledFont {
|
|
11
|
+
constructor(cffInfo: any, cmap: any, fontMatrix: any);
|
|
12
|
+
glyphs: any;
|
|
13
|
+
gsubrs: any;
|
|
14
|
+
subrs: any;
|
|
15
|
+
cmap: any;
|
|
16
|
+
glyphNameMap: any;
|
|
17
|
+
gsubrsBias: number;
|
|
18
|
+
subrsBias: number;
|
|
19
|
+
isCFFCIDFont: any;
|
|
20
|
+
fdSelect: any;
|
|
21
|
+
fdArray: any;
|
|
22
|
+
compileGlyphImpl(code: any, cmds: any, glyphId: any): void;
|
|
23
|
+
}
|
|
24
|
+
declare class CompiledFont {
|
|
25
|
+
constructor(fontMatrix: any);
|
|
26
|
+
fontMatrix: any;
|
|
27
|
+
compiledGlyphs: any;
|
|
28
|
+
compiledCharCodeToGlyphId: any;
|
|
29
|
+
getPathJs(unicode: any): any;
|
|
30
|
+
compileGlyph(code: any, glyphId: any): string;
|
|
31
|
+
compileGlyphImpl(): void;
|
|
32
|
+
hasBuiltPath(unicode: any): boolean;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export class ErrorFont {
|
|
2
|
+
constructor(error: any);
|
|
3
|
+
error: any;
|
|
4
|
+
loadedName: string;
|
|
5
|
+
missingFile: boolean;
|
|
6
|
+
charsToGlyphs(): never[];
|
|
7
|
+
encodeString(chars: any): any[];
|
|
8
|
+
exportData(): {
|
|
9
|
+
error: any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 'Font' is the class the outside world should use, it encapsulate all the font
|
|
14
|
+
* decoding logics whatever type it is (assuming the font type is supported).
|
|
15
|
+
*/
|
|
16
|
+
export class Font {
|
|
17
|
+
constructor(name: any, file: any, properties: any, evaluatorOptions: any);
|
|
18
|
+
name: any;
|
|
19
|
+
psName: any;
|
|
20
|
+
mimetype: string | null;
|
|
21
|
+
disableFontFace: any;
|
|
22
|
+
fontExtraProperties: any;
|
|
23
|
+
loadedName: any;
|
|
24
|
+
isType3Font: any;
|
|
25
|
+
missingFile: boolean;
|
|
26
|
+
cssFontInfo: any;
|
|
27
|
+
_charsCache: any;
|
|
28
|
+
_glyphCache: any;
|
|
29
|
+
isSerifFont: boolean;
|
|
30
|
+
isSymbolicFont: boolean;
|
|
31
|
+
isMonospace: boolean;
|
|
32
|
+
type: any;
|
|
33
|
+
subtype: any;
|
|
34
|
+
systemFontInfo: any;
|
|
35
|
+
isInvalidPDFjsFont: boolean;
|
|
36
|
+
fallbackName: any;
|
|
37
|
+
differences: any;
|
|
38
|
+
widths: any;
|
|
39
|
+
defaultWidth: any;
|
|
40
|
+
composite: any;
|
|
41
|
+
cMap: any;
|
|
42
|
+
capHeight: number;
|
|
43
|
+
ascent: number;
|
|
44
|
+
descent: number;
|
|
45
|
+
lineHeight: number;
|
|
46
|
+
fontMatrix: any;
|
|
47
|
+
bbox: any;
|
|
48
|
+
defaultEncoding: any;
|
|
49
|
+
toUnicode: any;
|
|
50
|
+
toFontChar: any[];
|
|
51
|
+
cidEncoding: any;
|
|
52
|
+
vertical: boolean | undefined;
|
|
53
|
+
vmetrics: any;
|
|
54
|
+
defaultVMetrics: any;
|
|
55
|
+
data: Uint8Array<ArrayBuffer> | undefined;
|
|
56
|
+
seacMap: any;
|
|
57
|
+
get renderer(): any;
|
|
58
|
+
exportData(): any;
|
|
59
|
+
fallbackToSystemFont(properties: any): void;
|
|
60
|
+
bold: boolean | undefined;
|
|
61
|
+
italic: boolean | undefined;
|
|
62
|
+
black: boolean | undefined;
|
|
63
|
+
remeasure: boolean | undefined;
|
|
64
|
+
checkAndRepair(name: any, font: any, properties: any): Uint8Array<ArrayBuffer>;
|
|
65
|
+
isOpenType: boolean | undefined;
|
|
66
|
+
lineGap: any;
|
|
67
|
+
convert(fontName: any, font: any, properties: any): Uint8Array<ArrayBuffer>;
|
|
68
|
+
/**
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
private get _spaceWidth();
|
|
72
|
+
/**
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
private _charToGlyph;
|
|
76
|
+
charsToGlyphs(chars: any): any;
|
|
77
|
+
/**
|
|
78
|
+
* Chars can have different sizes (depends on the encoding).
|
|
79
|
+
* @param {String} a string encoded with font encoding.
|
|
80
|
+
* @returns {Array<Array<number>>} the positions of each char in the string.
|
|
81
|
+
*/
|
|
82
|
+
getCharPositions(chars: any): Array<Array<number>>;
|
|
83
|
+
get glyphCacheValues(): any[];
|
|
84
|
+
/**
|
|
85
|
+
* Encode a js string using font encoding.
|
|
86
|
+
* The resulting array contains an encoded string at even positions
|
|
87
|
+
* (can be empty) and a non-encoded one at odd positions.
|
|
88
|
+
* @param {String} a js string.
|
|
89
|
+
* @returns {Array<String>} an array of encoded strings or non-encoded ones.
|
|
90
|
+
*/
|
|
91
|
+
encodeString(str: any): Array<string>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function compileType3Glyph({ data: img, width, height }: {
|
|
2
|
+
data: any;
|
|
3
|
+
width: any;
|
|
4
|
+
height: any;
|
|
5
|
+
}): (number | Float32Array<ArrayBuffer> | Float32Array<ArrayBuffer>[])[] | null;
|
|
6
|
+
export namespace FontFlags {
|
|
7
|
+
let FixedPitch: number;
|
|
8
|
+
let Serif: number;
|
|
9
|
+
let Symbolic: number;
|
|
10
|
+
let Script: number;
|
|
11
|
+
let Nonsymbolic: number;
|
|
12
|
+
let Italic: number;
|
|
13
|
+
let AllCap: number;
|
|
14
|
+
let SmallCap: number;
|
|
15
|
+
let ForceBold: number;
|
|
16
|
+
}
|
|
17
|
+
export const getVerticalPresentationForm: () => any;
|
|
18
|
+
export const MacStandardGlyphOrdering: string[];
|
|
19
|
+
export function normalizeFontName(name: any): any;
|
|
20
|
+
export function recoverGlyphName(name: any, glyphsUnicodeMap: any): any;
|
|
21
|
+
export const SEAC_ANALYSIS_ENABLED: true;
|
|
22
|
+
/**
|
|
23
|
+
* Shared logic for building a char code to glyph id mapping for Type1 and
|
|
24
|
+
* simple CFF fonts. See section 9.6.6.2 of the spec.
|
|
25
|
+
* @param {Object} properties Font properties object.
|
|
26
|
+
* @param {Object} builtInEncoding The encoding contained within the actual font
|
|
27
|
+
* data.
|
|
28
|
+
* @param {Array} glyphNames Array of glyph names where the index is the
|
|
29
|
+
* glyph ID.
|
|
30
|
+
* @returns {Object} A char code to glyph ID map.
|
|
31
|
+
*/
|
|
32
|
+
export function type1FontGlyphMapping(properties: Object, builtInEncoding: Object, glyphNames: any[]): Object;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GlyfTable object represents a glyf table containing glyph information:
|
|
3
|
+
* - glyph header (xMin, yMin, xMax, yMax);
|
|
4
|
+
* - contours if any;
|
|
5
|
+
* - components if the glyph is a composite.
|
|
6
|
+
*
|
|
7
|
+
* It's possible to re-scale each glyph in order to have a new font which
|
|
8
|
+
* exactly fits an other one: the goal is to be able to build some substitution
|
|
9
|
+
* font for well-known fonts (Myriad, Arial, ...).
|
|
10
|
+
*
|
|
11
|
+
* A full description of glyf table can be found here
|
|
12
|
+
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html
|
|
13
|
+
*/
|
|
14
|
+
export class GlyfTable {
|
|
15
|
+
constructor({ glyfTable, isGlyphLocationsLong, locaTable, numGlyphs }: {
|
|
16
|
+
glyfTable: any;
|
|
17
|
+
isGlyphLocationsLong: any;
|
|
18
|
+
locaTable: any;
|
|
19
|
+
numGlyphs: any;
|
|
20
|
+
});
|
|
21
|
+
glyphs: Glyph[];
|
|
22
|
+
getSize(): any;
|
|
23
|
+
write(): {
|
|
24
|
+
isLocationLong: boolean;
|
|
25
|
+
loca: Uint8Array<ArrayBuffer>;
|
|
26
|
+
glyf: Uint8Array<ArrayBuffer>;
|
|
27
|
+
};
|
|
28
|
+
scale(factors: any): void;
|
|
29
|
+
}
|
|
30
|
+
declare class Glyph {
|
|
31
|
+
static parse(pos: any, glyf: any): Glyph;
|
|
32
|
+
constructor({ header, simple, composites }: {
|
|
33
|
+
header?: null | undefined;
|
|
34
|
+
simple?: null | undefined;
|
|
35
|
+
composites?: null | undefined;
|
|
36
|
+
});
|
|
37
|
+
header: any;
|
|
38
|
+
simple: any;
|
|
39
|
+
composites: any;
|
|
40
|
+
getSize(): any;
|
|
41
|
+
write(pos: any, buf: any): number;
|
|
42
|
+
scale(factor: any): void;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class CmykICCBasedCS extends IccColorSpace {
|
|
2
|
+
static "__#private@#iccUrl": any;
|
|
3
|
+
static setOptions({ iccUrl }: {
|
|
4
|
+
iccUrl: any;
|
|
5
|
+
}): void;
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export class IccColorSpace extends ColorSpace {
|
|
9
|
+
static "__#private@#useWasm": boolean;
|
|
10
|
+
static "__#private@#wasmUrl": null;
|
|
11
|
+
static "__#private@#finalizer": null;
|
|
12
|
+
static setOptions({ useWasm, useWorkerFetch, wasmUrl }: {
|
|
13
|
+
useWasm: any;
|
|
14
|
+
useWorkerFetch: any;
|
|
15
|
+
wasmUrl: any;
|
|
16
|
+
}): void;
|
|
17
|
+
static get isUsable(): any;
|
|
18
|
+
constructor(iccProfile: any, name: any, numComps: any);
|
|
19
|
+
getOutputLength(inputLength: any, alpha01: any): number;
|
|
20
|
+
#private;
|
|
21
|
+
}
|
|
22
|
+
import { ColorSpace } from "./colorspace.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const Jbig2Error_base: any;
|
|
2
|
+
export class Jbig2Error extends Jbig2Error_base {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
constructor(msg: any);
|
|
5
|
+
}
|
|
6
|
+
export class Jbig2Image {
|
|
7
|
+
parseChunks(chunks: any): Uint8ClampedArray<ArrayBuffer> | undefined;
|
|
8
|
+
parse(data: any): Uint8ClampedArray<ArrayBuffer>;
|
|
9
|
+
width: any;
|
|
10
|
+
height: any;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For JBIG2's we use a library to decode these images and
|
|
3
|
+
* the stream behaves like all the other DecodeStreams.
|
|
4
|
+
*/
|
|
5
|
+
export class Jbig2Stream extends DecodeStream {
|
|
6
|
+
constructor(stream: any, maybeLength: any, params: any);
|
|
7
|
+
stream: any;
|
|
8
|
+
dict: any;
|
|
9
|
+
maybeLength: any;
|
|
10
|
+
params: any;
|
|
11
|
+
get bytes(): any;
|
|
12
|
+
ensureBuffer(requested: any): void;
|
|
13
|
+
readBlock(): void;
|
|
14
|
+
decodeImage(bytes: any): Uint8Array<ArrayBuffer>;
|
|
15
|
+
get canAsyncDecodeImageFromBuffer(): any;
|
|
16
|
+
}
|
|
17
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For JPEG's we use a library to decode these images and the stream behaves
|
|
3
|
+
* like all the other DecodeStreams.
|
|
4
|
+
*/
|
|
5
|
+
export class JpegStream extends DecodeStream {
|
|
6
|
+
static "__#private@#isImageDecoderSupported": any;
|
|
7
|
+
static get canUseImageDecoder(): any;
|
|
8
|
+
static setOptions({ isImageDecoderSupported }: {
|
|
9
|
+
isImageDecoderSupported?: boolean | undefined;
|
|
10
|
+
}): void;
|
|
11
|
+
constructor(stream: any, maybeLength: any, params: any);
|
|
12
|
+
stream: any;
|
|
13
|
+
dict: any;
|
|
14
|
+
maybeLength: any;
|
|
15
|
+
params: any;
|
|
16
|
+
get bytes(): any;
|
|
17
|
+
ensureBuffer(requested: any): void;
|
|
18
|
+
readBlock(): void;
|
|
19
|
+
get jpegOptions(): any;
|
|
20
|
+
decodeImage(bytes: any): Uint8Array<ArrayBuffer>;
|
|
21
|
+
get canAsyncDecodeImageFromBuffer(): any;
|
|
22
|
+
getTransferableImage(): Promise<VideoFrame | null>;
|
|
23
|
+
#private;
|
|
24
|
+
}
|
|
25
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare const JpegError_base: any;
|
|
2
|
+
export class JpegError extends JpegError_base {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
constructor(msg: any);
|
|
5
|
+
}
|
|
6
|
+
export class JpegImage {
|
|
7
|
+
static canUseImageDecoder(data: any, colorTransform?: number): {
|
|
8
|
+
exifStart: any;
|
|
9
|
+
exifEnd: any;
|
|
10
|
+
} | {
|
|
11
|
+
exifStart?: undefined;
|
|
12
|
+
exifEnd?: undefined;
|
|
13
|
+
} | null;
|
|
14
|
+
constructor({ decodeTransform, colorTransform }?: {
|
|
15
|
+
decodeTransform?: null | undefined;
|
|
16
|
+
colorTransform?: number | undefined;
|
|
17
|
+
});
|
|
18
|
+
_decodeTransform: any;
|
|
19
|
+
_colorTransform: number;
|
|
20
|
+
parse(data: any, { dnlScanLines }?: {
|
|
21
|
+
dnlScanLines?: null | undefined;
|
|
22
|
+
}): any;
|
|
23
|
+
width: any;
|
|
24
|
+
height: any;
|
|
25
|
+
jfif: {
|
|
26
|
+
version: {
|
|
27
|
+
major: any;
|
|
28
|
+
minor: any;
|
|
29
|
+
};
|
|
30
|
+
densityUnits: any;
|
|
31
|
+
xDensity: number;
|
|
32
|
+
yDensity: number;
|
|
33
|
+
thumbWidth: any;
|
|
34
|
+
thumbHeight: any;
|
|
35
|
+
thumbData: any;
|
|
36
|
+
} | null | undefined;
|
|
37
|
+
adobe: {
|
|
38
|
+
version: number;
|
|
39
|
+
flags0: number;
|
|
40
|
+
flags1: number;
|
|
41
|
+
transformCode: any;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
components: any[] | undefined;
|
|
44
|
+
numComponents: number | undefined;
|
|
45
|
+
_getLinearizedBlockData(width: any, height: any, isSourcePDF?: boolean): Uint8ClampedArray<ArrayBuffer>;
|
|
46
|
+
get _isColorConversionNeeded(): boolean;
|
|
47
|
+
_convertYccToRgb(data: any): any;
|
|
48
|
+
_convertYccToRgba(data: any, out: any): any;
|
|
49
|
+
_convertYcckToRgb(data: any): any;
|
|
50
|
+
_convertYcckToRgba(data: any): any;
|
|
51
|
+
_convertYcckToCmyk(data: any): any;
|
|
52
|
+
_convertCmykToRgb(data: any): any;
|
|
53
|
+
_convertCmykToRgba(data: any): any;
|
|
54
|
+
getData({ width, height, forceRGBA, forceRGB, isSourcePDF, }: {
|
|
55
|
+
width: any;
|
|
56
|
+
height: any;
|
|
57
|
+
forceRGBA?: boolean | undefined;
|
|
58
|
+
forceRGB?: boolean | undefined;
|
|
59
|
+
isSourcePDF?: boolean | undefined;
|
|
60
|
+
}): any;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const JpxError_base: any;
|
|
2
|
+
export class JpxError extends JpxError_base {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
constructor(msg: any);
|
|
5
|
+
}
|
|
6
|
+
export class JpxImage {
|
|
7
|
+
static "__#private@#buffer": null;
|
|
8
|
+
static "__#private@#handler": null;
|
|
9
|
+
static "__#private@#modulePromise": null;
|
|
10
|
+
static "__#private@#useWasm": boolean;
|
|
11
|
+
static "__#private@#useWorkerFetch": boolean;
|
|
12
|
+
static "__#private@#wasmUrl": null;
|
|
13
|
+
static setOptions({ handler, useWasm, useWorkerFetch, wasmUrl }: {
|
|
14
|
+
handler: any;
|
|
15
|
+
useWasm: any;
|
|
16
|
+
useWorkerFetch: any;
|
|
17
|
+
wasmUrl: any;
|
|
18
|
+
}): void;
|
|
19
|
+
static "__#private@#getJsModule"(fallbackCallback: any): Promise<void>;
|
|
20
|
+
static "__#private@#instantiateWasm"(fallbackCallback: any, imports: any, successCallback: any): Promise<any>;
|
|
21
|
+
static decode(bytes: any, { numComponents, isIndexedColormap, smaskInData, reducePower, }?: {
|
|
22
|
+
numComponents?: number | undefined;
|
|
23
|
+
isIndexedColormap?: boolean | undefined;
|
|
24
|
+
smaskInData?: boolean | undefined;
|
|
25
|
+
reducePower?: number | undefined;
|
|
26
|
+
}): Promise<never>;
|
|
27
|
+
static cleanup(): void;
|
|
28
|
+
static parseImageProperties(stream: any): {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
bitsPerComponent: number;
|
|
32
|
+
componentsCount: any;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For JPEG 2000's we use a library to decode these images and
|
|
3
|
+
* the stream behaves like all the other DecodeStreams.
|
|
4
|
+
*/
|
|
5
|
+
export class JpxStream extends DecodeStream {
|
|
6
|
+
constructor(stream: any, maybeLength: any, params: any);
|
|
7
|
+
stream: any;
|
|
8
|
+
dict: any;
|
|
9
|
+
maybeLength: any;
|
|
10
|
+
params: any;
|
|
11
|
+
get bytes(): any;
|
|
12
|
+
ensureBuffer(requested: any): void;
|
|
13
|
+
readBlock(decoderOptions: any): void;
|
|
14
|
+
decodeImage(bytes: any, decoderOptions: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
15
|
+
get canAsyncDecodeImageFromBuffer(): any;
|
|
16
|
+
}
|
|
17
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class LZWStream extends DecodeStream {
|
|
2
|
+
constructor(str: any, maybeLength: any, earlyChange: any);
|
|
3
|
+
str: any;
|
|
4
|
+
dict: any;
|
|
5
|
+
cachedData: number;
|
|
6
|
+
bitsCached: number;
|
|
7
|
+
lzwState: {
|
|
8
|
+
earlyChange: any;
|
|
9
|
+
codeLength: number;
|
|
10
|
+
nextCode: number;
|
|
11
|
+
dictionaryValues: Uint8Array<ArrayBuffer>;
|
|
12
|
+
dictionaryLengths: Uint16Array<ArrayBuffer>;
|
|
13
|
+
dictionaryPrevCodes: Uint16Array<ArrayBuffer>;
|
|
14
|
+
currentSequence: Uint8Array<ArrayBuffer>;
|
|
15
|
+
currentSequenceLength: number;
|
|
16
|
+
};
|
|
17
|
+
readBits(n: any): number | null;
|
|
18
|
+
lastCode: any;
|
|
19
|
+
readBlock(): void;
|
|
20
|
+
}
|
|
21
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class NameTree extends NameOrNumberTree {
|
|
2
|
+
constructor(root: any, xref: any);
|
|
3
|
+
}
|
|
4
|
+
export class NumberTree extends NameOrNumberTree {
|
|
5
|
+
constructor(root: any, xref: any);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A NameTree/NumberTree is like a Dict but has some advantageous properties,
|
|
9
|
+
* see the specification (7.9.6 and 7.9.7) for additional details.
|
|
10
|
+
* TODO: implement all the Dict functions and make this more efficient.
|
|
11
|
+
*/
|
|
12
|
+
declare class NameOrNumberTree {
|
|
13
|
+
constructor(root: any, xref: any, type: any);
|
|
14
|
+
root: any;
|
|
15
|
+
xref: any;
|
|
16
|
+
_type: any;
|
|
17
|
+
getAll(): Map<any, any>;
|
|
18
|
+
getRaw(key: any): any;
|
|
19
|
+
get(key: any): any;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class OpenTypeFileBuilder {
|
|
2
|
+
static getSearchParams(entriesCount: any, entrySize: any): {
|
|
3
|
+
range: number;
|
|
4
|
+
entry: number;
|
|
5
|
+
rangeShift: number;
|
|
6
|
+
};
|
|
7
|
+
constructor(sfnt: any);
|
|
8
|
+
sfnt: any;
|
|
9
|
+
tables: any;
|
|
10
|
+
toArray(): Uint8Array<ArrayBuffer>;
|
|
11
|
+
addTable(tag: any, data: any): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export class Lexer {
|
|
2
|
+
constructor(stream: any, knownCommands?: null);
|
|
3
|
+
stream: any;
|
|
4
|
+
strBuf: any[];
|
|
5
|
+
knownCommands: any;
|
|
6
|
+
_hexStringNumWarn: number;
|
|
7
|
+
beginInlineImagePos: number;
|
|
8
|
+
nextChar(): any;
|
|
9
|
+
currentChar: any;
|
|
10
|
+
peekChar(): any;
|
|
11
|
+
getNumber(): number;
|
|
12
|
+
getString(): string;
|
|
13
|
+
getName(): any;
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private _hexStringWarn;
|
|
18
|
+
getHexString(): string;
|
|
19
|
+
getObj(): any;
|
|
20
|
+
skipToNextLine(): void;
|
|
21
|
+
}
|
|
22
|
+
export class Linearization {
|
|
23
|
+
static create(stream: any): {
|
|
24
|
+
length: any;
|
|
25
|
+
hints: any[];
|
|
26
|
+
objectNumberFirst: any;
|
|
27
|
+
endFirst: any;
|
|
28
|
+
numPages: any;
|
|
29
|
+
mainXRefEntriesOffset: any;
|
|
30
|
+
pageFirst: any;
|
|
31
|
+
} | null;
|
|
32
|
+
}
|
|
33
|
+
export class Parser {
|
|
34
|
+
constructor({ lexer, xref, allowStreams, recoveryMode }: {
|
|
35
|
+
lexer: any;
|
|
36
|
+
xref: any;
|
|
37
|
+
allowStreams?: boolean | undefined;
|
|
38
|
+
recoveryMode?: boolean | undefined;
|
|
39
|
+
});
|
|
40
|
+
lexer: any;
|
|
41
|
+
xref: any;
|
|
42
|
+
allowStreams: boolean;
|
|
43
|
+
recoveryMode: boolean;
|
|
44
|
+
imageCache: any;
|
|
45
|
+
_imageId: number;
|
|
46
|
+
refill(): void;
|
|
47
|
+
buf1: any;
|
|
48
|
+
buf2: any;
|
|
49
|
+
shift(): void;
|
|
50
|
+
tryShift(): boolean;
|
|
51
|
+
getObj(cipherTransform?: null): any;
|
|
52
|
+
/**
|
|
53
|
+
* Find the end of the stream by searching for the /EI\s/.
|
|
54
|
+
* @returns {number} The inline stream length.
|
|
55
|
+
*/
|
|
56
|
+
findDefaultInlineStreamEnd(stream: any): number;
|
|
57
|
+
/**
|
|
58
|
+
* Find the EOI (end-of-image) marker 0xFFD9 of the stream.
|
|
59
|
+
* @returns {number} The inline stream length.
|
|
60
|
+
*/
|
|
61
|
+
findDCTDecodeInlineStreamEnd(stream: any): number;
|
|
62
|
+
/**
|
|
63
|
+
* Find the EOD (end-of-data) marker '~>' (i.e. TILDE + GT) of the stream.
|
|
64
|
+
* @returns {number} The inline stream length.
|
|
65
|
+
*/
|
|
66
|
+
findASCII85DecodeInlineStreamEnd(stream: any): number;
|
|
67
|
+
/**
|
|
68
|
+
* Find the EOD (end-of-data) marker '>' (i.e. GT) of the stream.
|
|
69
|
+
* @returns {number} The inline stream length.
|
|
70
|
+
*/
|
|
71
|
+
findASCIIHexDecodeInlineStreamEnd(stream: any): number;
|
|
72
|
+
/**
|
|
73
|
+
* Skip over the /EI/ for streams where we search for an EOD marker.
|
|
74
|
+
*/
|
|
75
|
+
inlineStreamSkipEI(stream: any): void;
|
|
76
|
+
makeInlineImage(cipherTransform: any): any;
|
|
77
|
+
makeStream(dict: any, cipherTransform: any): any;
|
|
78
|
+
filter(stream: any, dict: any, length: any): any;
|
|
79
|
+
makeFilter(stream: any, name: any, maybeLength: any, params: any): any;
|
|
80
|
+
#private;
|
|
81
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class PredictorStream extends DecodeStream {
|
|
2
|
+
constructor(str: any, maybeLength: any, params: any);
|
|
3
|
+
predictor: any;
|
|
4
|
+
readBlock: (() => void) | undefined;
|
|
5
|
+
str: any;
|
|
6
|
+
dict: any;
|
|
7
|
+
colors: any;
|
|
8
|
+
bits: any;
|
|
9
|
+
columns: any;
|
|
10
|
+
pixBytes: number | undefined;
|
|
11
|
+
rowBytes: number | undefined;
|
|
12
|
+
readBlockTiff(): void;
|
|
13
|
+
readBlockPng(): void;
|
|
14
|
+
}
|
|
15
|
+
import { DecodeStream } from "./decode_stream.js";
|