import { _MatrixHelper, _TransformationStack } from './text-extraction/matrix-helper';
import { TextGlyph, TextLine, TextWord } from './text-structure';
import { _PdfContentParserHelper } from './content-parser-helper';
import { _GraphicState } from './graphic-state';
import { _FontStructure } from './text-extraction/font-structure';
import { canvasRenderCallback } from './utils';
import { PdfDocument, _PdfDictionary, _PdfReference, PdfPage, _PdfRecord, _PdfCrossReference, PdfFontStyle, Rectangle } from '@syncfusion/ej2-pdf';
import { _PdfTextParser } from './pdf-text-parser';
import { PdfStructureElement } from './pdf-structure-element';
import { PdfEmbeddedImage } from './image-extraction/pdf-embedded-image';
/**
 * Represents a utility for extracting data from a PDF document.
 * ```typescript
 * // Load an existing PDF document
 * let document: PdfDocument = new PdfDocument(data, password);
 * // Initialize a new instance of the `PdfDataExtractor` class
 * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
 * // Extract `TextLine` from the PDF document.
 * let textLines: Array<TextLine> = extractor.extractTextLines({ startPageIndex: 0, endPageIndex: document.pageCount-1});
 * // Save the document
 * document.save('output.pdf');
 * // Destroy the document
 * document.destroy();
 * ```
 */
export declare class PdfDataExtractor {
    _document: PdfDocument;
    _rotation: number;
    _textMatrix: _MatrixHelper;
    _textLeading: number;
    _textColor: number[];
    _textLineMatrix: _MatrixHelper;
    _extractedText: string;
    _hasLeading: boolean;
    _hasNoSpacing: boolean;
    _textLines: TextLine[];
    _transformations: _TransformationStack;
    _identityMatrix: number[];
    _currentLocation: number[];
    _currentFont: string;
    _tempBoundingRectangle: Rectangle;
    _boundingRectangle: Rectangle;
    _previousRect: Rectangle;
    _fontSize: number;
    _textHorizontalScaling: number;
    _previousTextMatrix: _MatrixHelper;
    _previousFontSize: number;
    _previousExtractText: string;
    _arise: number;
    _isTextMatrix: boolean;
    _currentTextMatrix: _MatrixHelper;
    _text: string;
    _hasTj: boolean;
    _hasTm: boolean;
    _hasET: boolean;
    _characterSpacing: number;
    _wordSpacing: number;
    _hasBeginMarkedContent: boolean;
    _differenceX: number;
    _textScale: number;
    _textRise: number;
    _width: number;
    _height: number;
    _crossReference: _PdfCrossReference;
    _resultantText: string;
    _currentExtractedText: string;
    _initialTransForm: _MatrixHelper;
    _textGlyph: TextGlyph[];
    _textWord: TextWord[];
    _textLine: TextLine[];
    _textExtraction: string[];
    _fontCollection: Map<string, _FontStructure>;
    _ctm: _MatrixHelper;
    _objects: _MatrixHelper[];
    _isLayout: boolean;
    _isRotatePage: boolean;
    _isExtractTextLines: boolean;
    _contentParser: _PdfContentParserHelper;
    _parser: _PdfTextParser;
    _structureElement: PdfStructureElement;
    _referenceCollection: _PdfReference[];
    _elementOrder: number;
    _pageElements: PdfStructureElement[];
    _elementCollection: PdfStructureElement[];
    _orderSet: Set<number>;
    _mcidTextMap: Map<number, string[]>;
    _extractTaggedText: boolean;
    _currentContentId: number;
    _elementBoundsMap: Map<number[], number>;
    _hasContentID: boolean;
    _imageInfo: PdfEmbeddedImage[];
    _canvas: any;
    /**
     * Initialize a new instance of the `PdfDataExtractor` class
     *
     * @param {PdfDocument} document PDF document to get pages
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract collection of `PdfEmbeddedImage` from the PDF document.
     * let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
     * let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
     * let data: Uint8Array = imageInfo.data;
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    constructor(document: PdfDocument);
    /**
     * Initialize a new instance of the `PdfDataExtractor` class
     *
     * @param {PdfDocument} document PDF document to get pages
     * @param {Function} callBack - A callback function that returns a canvas element for rendering.
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data);
     * // Define a canvas render callback that returns a canvas element and the application platform.
     * const canvasRenderCallback = (): {canvas: any, applicationPlatform: ApplicationPlatform} => {
     *     const canvas = document.createElement('canvas');
     *     return { canvas: canvas, applicationPlatform: ApplicationPlatform.typescript };
     * };
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document, callBack: canvasRenderCallback);
     * // Extract collection of `PdfEmbeddedImage` from the PDF document.
     * let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
     * let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
     * let data: Uint8Array = imageInfo.data;
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    constructor(document: PdfDocument, callBack: canvasRenderCallback);
    /**
     * Extract text from the PDF document
     *
     * @returns {string} The extracted text
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data1);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract text content from the PDF document.
     * let text: string = extractor.extractText();
     * // Save the output PDF
     * document.save(‘Output.pdf’);
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractText(): string;
    /**
     * Extract text from the page ranges specified by start and end page number
     *
     * @param {object} options Options to specify the page range to be selected and to extract the text.
     * @returns {string} The extracted text
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data1);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract text content from the PDF document.
     * let text: string = extractor.extractText({ startPageIndex: 0, endPageIndex: document.pageCount - 1 });
     * // Save the output PDF
     * document.save(‘Output.pdf’);
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractText(options: {
        isLayout?: boolean;
        startPageIndex?: number;
        endPageIndex?: number;
    }): string;
    _renderTextAsLayOut(recordCollection: _PdfRecord[], page: PdfPage, fontCollection: Map<string, _FontStructure>, xObjectCollection: Map<string, any>): any;
    _renderText(page: PdfPage, fontCollection: Map<string, _FontStructure>, xObjectCollection: Map<string, any>, graphicState: _GraphicState, imageExtraction?: boolean): any;
    _extractImagcollection(page: PdfPage, fontCollection: Map<string, _FontStructure>, xObjectCollection: Map<string, any>, graphicState: _GraphicState): Promise<any>;
    _setTextLeading(textLeading: number): void;
    _moveToNextLine(tx: number, ty: number, textLineMatrix: _MatrixHelper): void;
    _updateTextMatrix(tj: number): _MatrixHelper;
    _updateTextLineMatrix(char: string, width: number): void;
    _renderTextElementFromTJ(elements: string[], page: PdfPage, fontCollection: Map<string, _FontStructure>): string;
    _getTextHeight(font: _FontStructure, textMatrix: _MatrixHelper): number;
    _transform(m1: number[], m2: number[]): number[];
    _buildTextContentStream(elements: string[], page: PdfPage, fontCollection: Map<string, _FontStructure>): void;
    _getTextWidth(text: string, extraSpacing: number, currentFont: _FontStructure, page: PdfPage, tempString: string): string;
    _splitWords(glyph: string, tempString: string, fontName: string, fontStyle: PdfFontStyle, page: PdfPage, rotation?: number, textColor?: number[]): string;
    _getTextRenderingMatrix(): _MatrixHelper;
    _renderFont(fontElements: string[]): void;
    /**
     * Extract `TextLine` collection from the PDF document.
     *
     * @returns {TextLine[]} The extracted textLines
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data1);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract `TextLine` from the PDF document.
     * let textCollection: TextLine[] = extractor.extractTextLines();
     * // Save the output PDF
     * document.save(‘Output.pdf’);
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractTextLines(): TextLine[];
    /**
     * Extract `TextLine` from the PDF document.
     *
     * @param {object} options The options to specify the page range to be selected.
     * @returns {TextLine[]} The extracted textLines
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data1);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract `TextLine` from the PDF document.
     * let textCollection: TextLine[] = extractor.extractTextLines({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
     * // Save the output PDF
     * document.save(‘Output.pdf’);
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractTextLines(options: {
        startPageIndex?: number;
        endPageIndex?: number;
    }): TextLine[];
    /**
     * //Extract all image information from the PDF document
     *
     * @returns {Promise<PdfEmbeddedImage[]>} The extracted collection of image information
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract collection of `PdfEmbeddedImage` from the PDF document.
     * let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
     * let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
     * let data: Uint8Array = imageInfo.data;
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractImages(): Promise<PdfEmbeddedImage[]>;
    /**
     * Extract all image information from the PDF document
     *
     * @param {object} options The options to specify the page range to be selected.
     * @returns {Promise<PdfEmbeddedImage[]>} The extracted collection of image information
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Extract collection of `PdfEmbeddedImage` from the PDF document.
     * let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
     * let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
     * let data: Uint8Array = imageInfo.data;
     * // Destroy the documents
     * document.destroy();
     * ```
     */
    extractImages(options: {
        startPageIndex?: number;
        endPageIndex?: number;
    }): Promise<PdfEmbeddedImage[]>;
    _processPages(startIndex: number, endIndex: number, isImageExtraction?: boolean): void;
    /**
     * Gets the root structure element of the PDF document.
     *
     * @returns {PdfStructureElement} The root structure element of the PDF document.
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data, password);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Access the structure element of the PDF document
     * let rootStructureElement: PdfStructureElement = extractor.getStructureElement();
     * // Save the document
     * document.save('output.pdf');
     * // Destroy the document
     * document.destroy();
     * ```
     */
    getStructureElement(): PdfStructureElement;
    /**
     * Gets the structure elements of PDF page.
     *
     * @param {PdfPage} page PDF page
     * @returns {PdfStructureElement[]} Structure elements
     *
     * ```typescript
     * // Load an existing PDF document
     * let document: PdfDocument = new PdfDocument(data, password);
     * // Initialize a new instance of the `PdfDataExtractor` class
     * let extractor: PdfDataExtractor = new PdfDataExtractor(document);
     * // Retrieve structure elements from the first page
     * let page: PdfPage = document.getPage(0);
     * let structureElements: PdfStructureElement[] = extractor.getStructureElements(page);
     * // Save the document
     * document.save('output.pdf');
     * // Destroy the document
     * document.destroy();
     * ```
     */
    getStructureElements(page: PdfPage): PdfStructureElement[];
    _getPageElements(element: PdfStructureElement, page: PdfPage): void;
    _getStructureTreeRoot(): PdfStructureElement;
    _getStructureElement(structureDictionary: _PdfDictionary, parent?: PdfStructureElement): PdfStructureElement;
    _isSingleRootElement(treeRoot: _PdfDictionary): boolean;
    _getFigureBounds(structElement: PdfStructureElement, page: PdfPage): Rectangle;
}
