TPDFlibSearchHit

Data Types

Description

TPDFlibSearchHit is a record structure representing a query result found during a text search on a page, storing the match coordinates, the match position within the surrounding block text and, when SearchContextChars is positive, the text immediately before and after the match

Syntax

Delphi

type TPDFlibSearchHit = record
    Page: Integer;
    Left: Double;
    Top: Double;
    Right: Double;
    Bottom: Double;
    MatchText: WideString;
    MatchStart: Integer;
    MatchLength: Integer;
    ContextBefore: WideString;
    ContextAfter: WideString;
  end;

Fields

PageThe 1-based page number where the search text match was found
LeftThe horizontal left coordinate of the hit bounding box
TopThe vertical top coordinate of the hit bounding box
RightThe horizontal right coordinate of the hit bounding box
BottomThe vertical bottom coordinate of the hit bounding box
MatchTextThe surrounding line of page text that matched the search query
MatchStartThe 1-based index of the match inside MatchText.
MatchLengthThe length of the matched run inside MatchText.
ContextBeforeUp to SearchContextChars characters immediately before the match; empty unless SearchContextChars is positive
ContextAfterUp to SearchContextChars characters immediately after the match; empty unless SearchContextChars is positive

See also

SearchText, SearchContextChars, AddTextMarkupFromSearchHits