@mescius/dspdfviewer
Version:
Document Solutions PDF Viewer
21 lines (20 loc) • 1.02 kB
TypeScript
/// <reference path="../vendor/i18next.d.ts" />
//@ts-ignore
import { i18n } from "i18next";
import GcPdfViewer from "../GcPdfViewer";
import { SearchResult } from "./types";
export declare class ReplaceHelper {
private viewer;
constructor(viewer: GcPdfViewer);
get in17n(): i18n;
get searcher(): import("./GcPdfSearcher").GcPdfSearcher;
/**
* Replaces the specified search results with the provided replacement text.
*
* @param {SearchResult[]} searchResults - An array of search result objects to process.
* @param {string | undefined} replaceWith - The replacement text to apply to each result. If undefined, no replacement is applied.
* @param {boolean} [showSummary] - Whether to show a summary of the replacement operation. Defaults to `false`.
* @returns {number} The number of successfully replaced search results.
*/
replaceSearchResults(searchResults: SearchResult[], replaceWith: string | undefined, showSummary?: boolean): number;
}