function FindFirst(const Text: WString; Options: TSearchOptions= []; StartIndex: Integer= 0; DirectionUp: Boolean= True): Integer;
-1在当前页面上启动文本搜索。在使用 FindNext 或 FindPrevious 遍历后续匹配之前调用此方法。每次调用 FindFirst 都会重置内部搜索句柄
要在不迭代的情况下视觉高亮所有出现,改用 HighlightSearchText
var Pos: Integer;
begin
Pos := PdfView.FindFirst('invoice', [soMatchCase]);
while Pos >= 0 do
begin
Memo1.Lines.Add('Found at index: ' + IntToStr(Pos));
Pos := PdfView.FindNext;
end;
end;