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與搜尋查詢比對相符的頁面文字周圍行
MatchStartMatchText
MatchLengthMatchText
ContextBeforeSearchContextCharsSearchContextChars
ContextAfterSearchContextCharsSearchContextChars

另請參閱

SearchTextSearchContextCharsSearchText