StartIndex je 0-baziran, a -1 znači kraj stranice. Parametar DirectionUp određuje smjer ove operacije pretraživanjafunction FindFirst(const Text: WString; Options: TSearchOptions= []; StartIndex: Integer= 0; DirectionUp: Boolean= True): Integer;
-1 if the text is not found.Initiates a text search na trenutnoj stranici. Call this method before using FindNext or FindPrevious to iterate through subsequent matches. Each call to FindFirst resets the internal search handle.
To highlight all occurrences visually without iterating, use HighlightSearchText instead.
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;