SearchTextEach

Κείμενο και εξαγωγή

Περιγραφή

Searches the selected document and emits each TPDFlibSearchHit immediately through OnHit, avoiding a caller-sized result bufferThe method reports page progress through

OnProgress and checks the shared Abort state between pages and text blocksSetting the callback

Cancel parameter to True stops the search and sets the same abort state; call ResetAbort before starting another operation

Σύνταξη

Delphi

Function TPDFlib.SearchTextEach(Const Query: WideString; Options: TPDFlibSearchOptions; Const PageRange: WideString; OnHit: TPDFlibSearchHitEvent): Integer;

Παράμετροι

QueryNon-empty search text
OptionsAny combination of soCaseSensitive and soWholeWord
PageRangeΈκφραση εύρους σελίδων ή κενή συμβολοσειρά για όλες τις σελίδες
OnHitCallback που καλείται μία φορά για κάθε matching text block· nil μετρά τις αντιστοιχίες χωρίς να τις υλοποιεί

Τιμές επιστροφής

Σύνολο ευρημάτων που εκδόθηκαν πριν την ολοκλήρωση ή ματαίωση