@syncfusion/ej2-pdfviewer
Version:
Essential JS 2 PDF viewer Component
68 lines (67 loc) • 2.45 kB
TypeScript
import { PdfViewerBase } from '../base';
import { PdfAnnotationBaseModel } from '../drawing/pdf-annotation-model';
/**
* Redaction Overlay Text Module
*
* This module provides functionality to display overlay text on redaction annotations
* when hovering over them, similar to how hover color changes work.
*
* @hidden
*/
export declare class RedactionOverlayText {
private pdfViewer;
private pdfViewerBase;
/**
* Constructor for RedactionOverlayText
* @param {any} pdfViewer - The PDF viewer instance
* @param {any} pdfViewerBase - The viewer base instance
*/
constructor(pdfViewer: any, pdfViewerBase: PdfViewerBase);
/**
* Renders overlay text on a redaction annotation
* @param {PdfAnnotationBaseModel} annotation - The redaction annotation
* @param {any} currentAnnot - current annotation
* @private
* @returns {void}
*/
renderRedactionOverlayText(annotation: PdfAnnotationBaseModel, currentAnnot?: any): void;
private setAttributeHtml;
private applyStyleAgainstCsp;
/**
* Removes overlay text from a redaction annotation
* @param {any} annotation - The redaction annotation
* @private
* @returns {void} - void
*/
removeRedactionOverlayText(annotation: any): void;
/**
* Gets the CSS align style based on text alignment
* @param {string} textAlign - The text alignment (left, right, center)
* @returns {string} The CSS align style
*/
private getAlignStyle;
/**
* Applies vertical text layout for narrow redaction annotations
* @param {HTMLElement} container - The container element
* @param {string} text - The text to display
* @param {string} textAlign - The text alignment
* @returns {void}
*/
private applyVerticalTextLayout;
/**
* Renders repeated text in a redaction annotation
* @param {HTMLElement} container - The container element
* @param {string} text - The text to repeat
* @param {number} fontSize - The font size
* @param {string} textAlign - The text alignment
* @returns {void} - void
*/
private renderRepeatedTextHtml;
/**
* Updates the redaction annotation after editing (resize/drag)
* @param {PdfAnnotationBaseModel} annotation - The redaction annotation
* @private
* @returns {void} -void
*/
updateRedactionAfterEdit(annotation: PdfAnnotationBaseModel): void;
}