import { _PdfAnnotationType, _PdfContentStream, _PdfDictionary, PdfAnnotation, PdfDocument, PdfPage, Rectangle } from '@syncfusion/ej2-pdf'; import { PdfRedactionRegion } from './pdf-redaction-region'; /** * Internal processor that applies redaction updates to page content streams and annotations. * * @private */ export declare class _PdfRedactionProcessor { /** * Replaces the page `Contents` with a newly built stream and paints visual redaction overlays. * * @private * @param {PdfPage} page The page to update. * @param {_PdfContentStream} stream The rebuilt content stream to set on the page. * @param {PdfRedactionRegion[]} options Redaction regions to render. * @param {PdfDocument} document The owning document. * @returns {void} nothing. */ _updateContentStream(page: PdfPage, stream: _PdfContentStream, options: PdfRedactionRegion[], document: PdfDocument): void; /** * Removes/redacts form fields intersecting with redaction regions. * * @private * @param {PdfPage} page The current page. * @param {PdfRedactionRegion[]} options Redaction regions on the page. * @param {PdfDocument} document The owning document. * @returns {void} nothing. */ _processFormFields(page: PdfPage, options: PdfRedactionRegion[], document: PdfDocument): void; /** * Checks whether two rectangles intersect. * * @private * @param {Rectangle} values The first rectangle. * @param {Rectangle} redactionBounds The second rectangle. * @returns {boolean} `true` if the rectangles intersect otherwise, `false`. */ _isFound(values: Rectangle, redactionBounds: Rectangle): boolean; /** * Tests two axis-aligned rectangles for intersection. * * @private * @param {{x: number, y: number, width: number, height: number}} rect1 First rectangle. * @param {{x: number, y: number, width: number, height: number}} rect2 Second rectangle. * @returns {boolean} `true` if they intersect; otherwise, `false`. */ _intersectsWith(rect1: { x: number; y: number; width: number; height: number; }, rect2: { x: number; y: number; width: number; height: number; }): boolean; /** * Returns whether a rectangle dimension is empty or invalid. * * @private * @param {number} width Rectangle width. * @param {number} height Rectangle height. * @returns {boolean} `true` if width/height is non-positive; otherwise, `false`. */ _isEmptyRectangle(width: number, height: number): boolean; /** * Normalizes raw coordinates into a `Rectangle` with positive width and height. * * @private * @param {number} x X1 or X2. * @param {number} y Y1 or Y2. * @param {number} width X2 or X1. * @param {number} height Y2 or Y1. * @returns {{x: number, y: number, width: number, height: number}} Normalized rectangle. */ _toRectangle(x: number, y: number, width: number, height: number): { x: number; y: number; width: number; height: number; }; /** * Checks whether a form field kid belongs to the given page. * * @private * @param {_PdfDictionary} kid Kid dictionary. * @param {PdfPage} page Page to compare with. * @returns {boolean} `true` if kid belongs to `page`; otherwise, `false`. */ _isKidInSamePage(kid: _PdfDictionary, page: PdfPage): boolean; /** * Resolves a best-effort annotation type for loaded/unloaded annotations. * * @private * @param {PdfAnnotation} annotation The annotation object. * @returns {_PdfAnnotationType} The inferred annotation type. */ _checkAnnotationType(annotation: PdfAnnotation): _PdfAnnotationType; /** * Removes annotations that intersect redaction regions as needed. * * @private * @param {PdfPage} page The page whose annotations are processed. * @param {PdfRedactionRegion[]} options Redaction regions on page. * @returns {void} nothing. */ _processAnnotation(page: PdfPage, options: PdfRedactionRegion[]): void; /** * Computes a bounding rectangle from a flat coordinates array in page space. * * @private * @param {number[]} points Flat sequence of coordinates. * @param {PdfPage} loadedPage Page whose height is used to normalize Y. * @returns {{ bounds: { x: number; y: number; width: number; height: number }, isValidAnnotation: boolean }} Bounds and validity flag. */ _getBoundsFromPoints(points: number[], loadedPage: PdfPage): { bounds: { x: number; y: number; width: number; height: number; }; isValidAnnotation: boolean; }; /** * Checks whether a line segment intersects an axis-aligned rectangle. * * @private * @param {{x: number, y: number, width: number, height: number}} redactBounds Rectangle bounds. * @param {number} p1X First point X. * @param {number} p1Y First point Y. * @param {number} p2X Second point X. * @param {number} p2Y Second point Y. * @returns {boolean} `true` if intersects; otherwise, `false`. */ _isLineIntersectRectangle(redactBounds: { x: number; y: number; width: number; height: number; }, p1X: number, p1Y: number, p2X: number, p2Y: number): boolean; /** * Compares two rectangles for exact equality. * * @private * @param {{x: number, y: number, width: number, height: number}} bounds1 First rectangle. * @param {{x: number, y: number, width: number, height: number}} bounds2 Second rectangle. * @returns {boolean} `true` if same; otherwise, `false`. */ _isBoundsEqual(bounds1: { x: number; y: number; width: number; height: number; }, bounds2: { x: number; y: number; width: number; height: number; }): boolean; /** * Resolves the `_PdfAnnotationType` from a raw annotation dictionary. * * @private * @param {_PdfDictionary} dictionary Raw annotation dictionary. * @returns {_PdfAnnotationType} Resolved annotation type. */ _getAnnotationType(dictionary: _PdfDictionary): _PdfAnnotationType; /** * Returns `true` if a border array indicates a text web link annotation. * * @private * @param {any[]} array Border array or nested arrays. * @returns {boolean} `true` when border is effectively zero otherwise, `false`. */ _findAnnotation(array: any[]): boolean; }