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 内从 1 开始的索引 |
| MatchLength | 匹配片段在 MatchText 内的长度 |
| ContextBefore | 匹配项紧前方最多 SearchContextChars 个字符;除非 SearchContextChars 为正数,否则为空 |
| ContextAfter | 匹配项紧后方最多 SearchContextChars 个字符;除非 SearchContextChars 为正数,否则为空 |