TPDFlibSearchHit
資料類型
描述
TPDFlibSearchHit 是一個記錄結構,代表頁面文字搜尋中找到的查詢結果,保存比對座標、比對在所屬區塊文字中的位置,並且在 SearchContextChars 為正值時,一併保存緊鄰比對前後的文字
語法
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;欄位
| Page | 找到搜尋文字相符處的頁碼,從 1 開始 |
|---|---|
| Left | 命中邊界框的水平左座標 |
| Top | 命中邊界框的垂直頂端座標 |
| Right | 命中邊界框的水平右座標 |
| Bottom | 命中邊界框的垂直底部座標 |
| MatchText | 與搜尋查詢比對相符的頁面文字周圍行 |
| MatchStart | MatchText |
| MatchLength | MatchText |
| ContextBefore | SearchContextCharsSearchContextChars |
| ContextAfter | SearchContextCharsSearchContextChars |