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
| Page | The 1-based page number where the search text match was found |
|---|---|
| Left | The horizontal left coordinate of the hit bounding box |
| Top | The vertical top coordinate of the hit bounding box |
| Right | The horizontal right coordinate of the hit bounding box |
| Bottom | The vertical bottom coordinate of the hit bounding box |
| MatchText | The surrounding line of page text that matched the search query |
| MatchStart | The 1-based index of the match inside MatchText. |
| MatchLength | The length of the matched run inside MatchText. |
| ContextBefore | Up to SearchContextChars characters immediately before the match; empty unless SearchContextChars is positive |
| ContextAfter | Up to SearchContextChars characters immediately after the match; empty unless SearchContextChars is positive |