ImageEn, unit iexUserInteractions

TIEPdfViewerInteraction.HighlightText

TIEPdfViewerInteraction.HighlightText


Declaration

procedure HighlightText(const s: string; MatchCase: Boolean = False; MatchWholeWord: Boolean = False);


Description

Marks all instances of the specified string with an orange background.
Parameter Description
s The text to highlight
MatchCase Enable for a case sensitive search
MatchWholeWord Enable to require the search text to match the whole word

Notes:
- Specify the highlight color in PdfViewerDefaults
- Unlike Find, HighlightText applies to all pages, i.e. the text will be highlighted even when changing pages
- Call ClearHighlightedText to disable the highlighting
- When showing all pages, highlighting is only shown for the active page


Demo

Demo  Demos\Other\PdfViewer\PdfViewer.dpr


Example

// Highlight the text "Adobe" thoughout the document
ImageEnView1.PdfViewer.HighlightText( 'Adobe' );


See Also

- ClearHighlightedText