| Method | Description |
|---|---|
Create | Initialises a document-owned search with text, options, starting page, direction and cancellation token |
Destroy | Closes retained native search handles and detaches from the owner document |
Next(out Match: TPdfDocumentSearchResult): Boolean | Returns the next match or False after completion, cancellation or owner-document closure |
| Property | Type | Description |
|---|---|---|
CurrentPage | Integer | One-based page currently being searched |
Direction | TPdfDocumentSearchDirection | Forward or backward page and match traversal |
Finished | Boolean | Whether no further result can be produced |
Cancelled | Boolean | Whether cooperative cancellation ended the search |
MatchCount | UInt64 | Number of matches already returned |
| Field | Type | Description |
|---|---|---|
PageNumber | Integer | One-based page containing the match |
StartIndex | Integer | Zero-based native text-page character index |
Count | Integer | Number of native text-page characters in the match |
Text | WString | Unicode text extracted from the matched range |
Rectangles | TPdfRectangles | One or more merged PDF page-space rectangles for highlighting |
The caller owns the search and must free it. The owner document tracks live searches only so it can close their native handles before the document is unloaded
Calls into the owner document share its PDFium lock. A single search instance must still be advanced and freed from one coordinated caller, and document editing must not overlap an active search