import { _PdfLexicalOperator } from '@syncfusion/ej2-pdf'; /** * Represents a character mapping used to translate character codes * to destination character sequences or CIDs. * * @private */ export declare class _PdfCharacterMap { /** * Code space ranges per byte-length. * * @private */ _codeSpaceRanges: any; /** * Number of code space ranges populated. * * @private */ _numberOfCodeSpaceRanges: number; /** * Internal map from source code to destination value. * * @private */ _map: any; /** * CMap name when provided. * * @private */ _name: string; /** * Vertical writing mode flag for this CMap. * * @private */ _vertical: boolean; /** * If this CMap is a built-in one. * * @private */ _builtInCMap: any; /** * Optional linked useCMap (extension map) for fallback mappings. * * @private */ _useCMap: any; /** * Maximum range size allowed when mapping ranges. * * @private */ _maximumMapRange: number; constructor(builtInCMap?: boolean); /** * Iterate over each mapped entry and invoke the callback. * * @private * @param {Function} callback Function called with `(key, value)` for each mapping. * @returns {void} nothing. */ _forEach(callback: any): void; /** * Inserts a codespace range for the given byte-length. * * @private * @param {number} number Byte-length of codespace (1..4 typically). * @param {number} low Lower bound of the range. * @param {number} high Upper bound of the range. * @returns {void} nothing. */ _insertCodeSpaceRange(number: number, low: number, high: number): void; /** * Maps a continuous source range to successive string destinations. * * @private * @param {number} low Starting source code. * @param {number} high Ending source code. * @param {any} destinationLow Destination string for the `low` code. * @returns {void} nothing. */ _mapRangeToDestination(low: number, high: number, destinationLow: any): void; /** * Maps a source range to a provided array of destination values. * * @private * @param {number} low Starting source code. * @param {number} high Ending source code. * @param {any} array Array of destination values corresponding to the range. * @returns {void} nothing. */ _mapRangeToArray(low: number, high: number, array: any): void; /** * Map a single source code to a destination value. * * @private * @param {any} source Source code key. * @param {any} destination Destination value to map to. * @returns {void} nothing. */ _mapOne(source: any, destination: any): void; _lookup(code: any): void; /** * Check whether a mapping exists for the given source code. * * @private * @param {any} code Source code to test. * @returns {boolean} True when a mapping exists. */ _contains(code: any): any; /** * Maps a contiguous range of CIDs to a contiguous destination range. * Throws when the requested range exceeds the internal maximum allowed span. * * @private * @param {number} low The starting source CID. * @param {number} high The ending source CID . * @param {number} destinationLow The starting destination CID to map . * @returns {void} nothing. * @throws {Error} If exceeds `_maximumMapRange`. */ _mapCharacterIdentifierRange(low: number, high: number, destinationLow: number): void; /** * Reads a character code from a string at `offset` using the codespace ranges * and writes the `charcode` and `length` to the provided `out` object. * * @private * @param {any} text Source string to read from. * @param {any} offset Offset within the string to start reading. * @param {any} out Object that will receive `{ charcode, length }`. * @returns {void} nothing. */ _readCharacterCodeFromString(text: any, offset: any, out: any): void; } /** * Factory responsible for creating `_PdfCharacterMap` instances from CMap * sources. * * @private */ export declare class _PdfCharacterMapFactory { /** * Known compression types for CMap payloads. * * @private */ _cmapCompressionType: any; /** * List of built in CMap names used for standard PDF font encodings. * * @private */ _builtInCharacterMap: any; /** * End-of-file marker used by CMap lexical parsing. * * @private */ eof: string; /** * Create a `_PdfCharacterMap` from a name or stream encoding. * * @private * @param {any} encoding Name or stream containing the CMap data. * @param {Function} fetchBuiltInCharacterMap Callback to fetch built-in maps. * @param {any} _useCharacterMap Optional use-cmap name to extend from. * @returns {any} The parsed `_PdfCharacterMap` or `undefined` when not applicable. */ _create(encoding: any, fetchBuiltInCharacterMap: any, _useCharacterMap: any): any; /** * Create a built in CMap by name. * * @private * @param {string} name Built-in CMap name. * @param {Function} fetchBuiltInCharacterMap Callback to fetch map data. * @returns {any} Parsed character map or the result of binary parsing. */ _createBuiltInCharacterMap(name: string, fetchBuiltInCharacterMap: any): any; /** * Fetch built-in character map data (base64) and return a byte array. * * @private * @param {string} name Name of the built-in CMap. * @returns {any} Object containing `uint8Array` and `isCompressed` flag. */ _fetchCharacterMap(name: string): any; /** * Decode a base64 string into a `Uint8Array`. * * @private * @param {string} base64String Base64 encoded string. * @returns {Uint8Array} Decoded bytes. */ _base64ToUnSigned8Array(base64String: string): Uint8Array; /** * Parse a textual CMap definition from the provided lexer and populate * the supplied `characterMap`. * * @private * @param {any} characterMap The `_PdfCharacterMap` to populate. * @param {_PdfLexicalOperator} lexer Lexical operator instance for reading tokens. * @param {Function} fetchBuiltInCMap Callback used to fetch built-in maps. * @param {any} _useCharacterMap Optional CMap name to extend from. * @returns {any} The populated character map or an extended map when `useCMap` used. */ _parseCharacterMap(characterMap: any, lexer: _PdfLexicalOperator, fetchBuiltInCMap: any, _useCharacterMap: any): any; /** * Convert a string of bytes (each char treated as a byte) to an integer. * * @private * @param {string} text Input string containing byte values. * @returns {number} Unsigned integer representation. */ _stringToInt(text: string): number; /** * Validate that the provided object is a string. Throws when not. * * @private * @param {any} object Object to validate. * @returns {void} nothing. */ _validateString(object: any): void; /** * Validate that the provided object is an integer. Throws when not. * * @private * @param {any} object Object to validate as integer. * @returns {void} nothing. */ _expectInt(object: any): void; /** * Parse `beginbfchar`/`endbfchar` blocks mapping single source codes * to destination strings. * * @private * @param {any} characterMap Target character map to populate. * @param {_PdfLexicalOperator} lexer Token reader for the CMap stream. * @returns {void} nothing. */ _parseBaseFontCharacter(characterMap: any, lexer: _PdfLexicalOperator): void; /** * Parse `beginbfrange` blocks mapping source ranges to destinations. * * @private * @param {_PdfCharacterMap} cMap Target character map. * @param {_PdfLexicalOperator} lexer Lexer providing tokens. * @returns {void} nothing. */ _mapBaseFontRange(cMap: _PdfCharacterMap, lexer: _PdfLexicalOperator): void; /** * Parse `begincidchar` blocks mapping CIDs to integers. * * @private * @param {any} characterMap Target character map. * @param {_PdfLexicalOperator} lexer Lexer for reading tokens. * @returns {void} nothing. */ _processCharacterMapping(characterMap: any, lexer: _PdfLexicalOperator): void; /** * Parse `begincidrange` blocks mapping code ranges to CID ranges. * * @private * @param {any} characterMap Target character map. * @param {any} lexer Lexer-like object providing `getObj`. * @returns {void} nothing. */ _parseCharacterIdentifierRange(characterMap: any, lexer: any): any; /** * Parse `begincodespacerange` blocks and insert codespace ranges. * * @private * @param {_PdfCharacterMap} characterMap Target character map. * @param {_PdfLexicalOperator} lexer Lexer for reading tokens. * @returns {void} nothing. */ _parseCodeSpaceRange(characterMap: _PdfCharacterMap, lexer: _PdfLexicalOperator): void; /** * Parse the writing mode (`WMode`) entry and set vertical mode on the map. * * @private * @param {any} cMap Target character map. * @param {_PdfLexicalOperator} lexer Lexer providing the next token. * @returns {void} nothing. */ _parseWritingMode(cMap: any, lexer: _PdfLexicalOperator): void; /** * Parse the `CMapName` entry from the lexer and set the name. * * @private * @param {any} characterMap Target character map. * @param {_PdfLexicalOperator} lexer Lexer providing tokens. * @returns {void} nothing. */ _parseCharacterMapName(characterMap: any, lexer: _PdfLexicalOperator): void; /** * Extend a parsed character map with a built-in useCMap fallback. * * @private * @param {any} characterMap Target character map to extend. * @param {Function} fetchBuiltInCMap Callback to fetch built-in maps. * @param {any} _useCharacterMap Name of the useCMap to extend from. * @returns {any} The extended character map. */ _extendCMap(characterMap: any, fetchBuiltInCMap: any, _useCharacterMap: any): any; } /** * Identity CMap that maps code points to themselves (horizontal/vertical). * * @private */ export declare class _PdfIdentityCharacterMap extends _PdfCharacterMap { /** * Creates an identity map and sets full 16 bit codespace. * * @private * @param {boolean} vertical Whether the map is vertical. * @param {any} count Internal codespace index. // eslint-disable-line */ constructor(vertical: boolean, count: any); /** * Adds a codespace range [low, high] at the given slot. * * @private * @param {number} count Slot index. * @param {number} low Range start. * @param {number} high Range end. * @returns {void} nothing. */ _insertCodeSpaceRange(count: number, low: number, high: number): void; /** * Looks up a code; returns it if within 0x0000–0xFFFF. * * @private * @param {any} code Input code. // eslint-disable-line * @returns {any} Code or `undefined`. // eslint-disable-line */ _lookup(code: any): any; /** * Checks if the code is a valid 16‑bit value. * * @private * @param {any} code Input code. // eslint-disable-line * @returns {boolean} True if valid; otherwise false. */ _contains(code: any): boolean; /** * Returns the char code for a value or -1 if invalid. * * @private * @param {any} value Input value. // eslint-disable-line * @returns {any} Code or -1. // eslint-disable-line */ _charCodeOf(value: any): any; /** * Returns the char code for a value or -1 if invalid. * * @private * @param {any} callback Input value. */ _forEach(callback: any): void; }