PDFium Delphi Component Docs

AddSearchTextHighlight method

Component: TPdfView  ·  Unit: PDFium
Appends unique matches for another query to the active page's search highlight overlay

Syntax

function AddSearchTextHighlight(const Text: WString; MatchCase: Boolean= False; MatchWholeWord: Boolean= False): Integer;

Description

The method scans the active page with the requested case and whole-word options, then appends every character range that is not already present in the highlight set

The return value is the number of unique ranges added by this call, or 0 when the view is inactive, the query is empty, no match exists or every matching range is already highlighted

Remarks

Example

PdfView1.HighlightSearchText('invoice');
PdfView1.AddSearchTextHighlight('overdue');
PdfView1.AddSearchTextHighlight('total');

See Also

HighlightSearchText, ClearHighlight, HighlightColor