HighlightTextSearchHits
Annotations and hotspot links
Description
Applies the same per-hit markup bridge as AddTextMarkupFromSearchHits, but sources its hits from the active stateful search session started with BeginTextSearch instead of a caller-supplied array
Returns 0 immediately, without adding any annotation, when no search session is running, when the session was built against a document other than the one currently selected, or when the session retained zero hits
Syntax
Delphi
Function TPDFlib.HighlightTextSearchHits(MarkupType: Integer): Integer;Parameters
| MarkupType | 1 = Highlight, 2 = Underline, 3 = Squiggly, 4 = StrikeOut |
|---|
Return values
The number of markup annotations created from the active session's retained hits; 0 when no eligible session exists
Remarks
Works together with BeginTextSearch, NextTextSearchHit, TextSearchHitCount and EndTextSearch. Call this before EndTextSearch releases the retained hits. Use AddTextMarkupFromSearchHits instead when the hits come from SearchText, SearchTextEach, SearchTextBatch or GetTextInAreaEx rather than a stateful session
See also
AddTextMarkupFromSearchHits, BeginTextSearch, NextTextSearchHit, TextSearchHitCount, EndTextSearch