UNPKG

captide

Version:

Get millions of financial documents into your AI app 🚀

33 lines (32 loc) • 1.02 kB
/** * PDF Highlighting Utility * * Provides functionality to find and highlight text in PDF documents using PDF.js */ export interface HighlightResult { page: number; textItems: Array<{ index: number; item: any; start: number; end: number; }>; textContent: any; } export interface CurrentHighlight { element: HTMLElement; page: number; text: string; } /** * Find text in PDF and return matching text items with coordinates */ export declare const findTextInPDF: (searchText: string, pdfViewerInstance: any, targetPage?: number) => Promise<HighlightResult | null>; /** * Create a rectangle highlight overlay on a PDF page */ export declare const createRectangleHighlight: (searchText: string, pdfViewerInstance: any, targetPage?: number, currentHighlight?: CurrentHighlight | null) => Promise<CurrentHighlight | null>; /** * Remove a highlight element from the DOM */ export declare const removeHighlight: (highlight: CurrentHighlight | null) => void;