import { _PdfContentStream, _PdfCrossReference, _PdfDictionary, PdfPage } from '@syncfusion/ej2-pdf'; import { _FontStructure } from './text-extraction/font-structure'; import { _GraphicState } from './graphic-state'; import { _TextProcessingMode } from './enum'; import { _PdfContentParserHelper } from './content-parser-helper'; import { PdfDataExtractor } from './pdf-data-extractor'; import { ApplicationPlatform } from './image-extraction'; /** * Removes escape sequences from a text string and returns the cleaned text. * * @private * @param {string} text - The string to process. * @returns {string} The processed string without escape sequences. */ export declare function _ignoreEscapeSequence(text: string): string; /** * Adds font resources from a PDF dictionary into a collection. * * @private * @param {_PdfDictionary} dictionary - PDF Dictionary containing font resources. * @param {_PdfCrossReference} crossReference - The cross-reference of the PDF document. * @returns {Map} A map of font structure objects. */ export declare function _addFontResources(dictionary: _PdfDictionary, crossReference: _PdfCrossReference): Map; /** * Retrieves XObject resources from a PDF dictionary and their associated cross-references. * * @private * @param {_PdfDictionary} resources - The resources dictionary from a PDF page. * @param {_PdfCrossReference} crossReference - The cross-reference of the PDF document. * @param { _TextProcessingMode } [mode] - Optional processing mode that controls how XObjects are interpreted * @param { PdfPage } page - The current PDF page, used when constructing image structures. * @returns {Map} A map of XObject resources. */ export declare function _getXObjectResources(resources: _PdfDictionary, crossReference: _PdfCrossReference, mode?: _TextProcessingMode, page?: PdfPage): Map; /** * Converts a hexadecimal string to its equivalent character representation. * * @private * @param {string} hex - The hexadecimal string to convert. * @returns {string} The resulting string of characters. */ export declare function _hexToChar(hex: string): string; /** * Skips recognized escape sequences in a text string. * * @private * @param {string} text - The string containing escape sequences. * @returns {string} A new string with escape sequences removed or handled appropriately. */ export declare function _skipEscapeSequence(text: string): string; /** * Converts escape sequences in a string to their corresponding literal characters. * * @private * @param {string} text The input string containing escape sequences. * * @returns {string} The parsed string with escape sequences replaced by literal characters. */ export declare function _parseEscapedText(text: string): string; /** * Retrieves a literal string, decoding escape sequences and null characters. * * @private * @param {string} encodedText - The encoded string to decode. * @param {string} [encoding] - The encoding used in the text. * @returns {string} The decoded literal string. */ export declare function _getLiteralString(encodedText: string, encoding?: string): string; /** * Decodes encoded text using the specified font structure, adjusting for encoding differences. * * @private * @param {string} encodedText - The encoded string to decode. * @param {_FontStructure} font - The font structure for decoding glyphs. * @param {string[]} inputText - An array of strings representing parts of the text. * @returns {string} The decoded text. */ export declare function _decodeEncodedText(encodedText: string, font: _FontStructure, inputText: string[]): string; /** * Retrieves a content stream object for a specified XObject, processing it according to the provided mode. * * @private * @param {string[]} xObjectElement - The XObject elements to process. * @param {PdfPage} page - The PDF page to which the content stream belongs. * @param {Map} xObjectCollection - A collection of XObject elements. * @param {_PdfContentParserHelper | PdfDataExtractor} data - The data extractor or content parser helper. * @param {_TextProcessingMode} [mode] - The mode of text processing. * @param {_GraphicState} [graphicState] - The current graphic state. * @returns {_PdfContentStream | void} The processed PDF content stream or void. */ export declare function _getXObject(xObjectElement: string[], page: PdfPage, xObjectCollection: Map, data?: _PdfContentParserHelper | PdfDataExtractor, mode?: _TextProcessingMode, graphicState?: _GraphicState): _PdfContentStream | void; /** * Retrieves a content stream object for a specified XObject, processing it according to the provided mode. * * @private * @param {string[]} xObjectElement - The XObject elements to process. * @param {PdfPage} page - The PDF page to which the content stream belongs. * @param {Map} xObjectCollection - A collection of XObject elements. * @param {_PdfContentParserHelper | PdfDataExtractor} data - The data extractor or content parser helper. * @param {_TextProcessingMode} [mode] - The mode of text processing. * @param {_GraphicState} [graphicState] - The current graphic state. * @returns {Promise<_PdfContentStream | void>} The processed PDF content stream or void. */ export declare function _fetchXObject(xObjectElement: string[], page: PdfPage, xObjectCollection: Map, data?: _PdfContentParserHelper | PdfDataExtractor, mode?: _TextProcessingMode, graphicState?: _GraphicState): Promise<_PdfContentStream | void>; /** * Parses encoded text and returns both the decoded string list and width table. * * @private * @param {string} encodedText - The encoded text string to be parsed. * @param {_FontStructure} font - The font structure used to map encoded characters to glyphs. * @returns {object} An object containing `decodedStrings`, a list of decoded strings, and `charWidths`, a list of character widths. */ export declare function _parseEncodedText(encodedText: string, font: _FontStructure): [string[], number[][]]; /** * Compare two arrays of numbers to determine if they are equal. * * This function checks if two arrays have the same length and * identical elements in the same order. * * @private * @param {number[]} arr1 - The first array to compare. * @param {number[]} arr2 - The second array to compare. * @returns {boolean} 'true' if the arrays are equal, otherwise 'false'. */ export declare function _isArrayEqual(arr1: number[], arr2: number[]): boolean; /** * Convert a Base64-encoded string into a Uint8Array of bytes. * * @private * @param {string} base64String - The Base64-encoded string to decode. * @returns {Uint8Array} A Uint8Array containing the decoded bytes. * */ export declare function _base64ToUint8Array(base64String: string): Uint8Array; /** * Represents a callback function that returns a canvas element. * * @private * @returns {{canvas: any, applicationPlatform: ApplicationPlatform}} An object instance * * ```typescript * const canvasRenderCallback: canvasRenderCallback = () => { * return { canvas: canvas, applicationPlatform: ApplicationPlatform.typescript}; * }; * ``` */ export declare type canvasRenderCallback = () => { canvas: any; applicationPlatform: ApplicationPlatform; };