Skip to main content

TdxPDFViewerTextSearch.Find(string,TdxPDFDocumentTextSearchOptions,TdxPDFPageTextRanges) Method

Searches the specified text string within the loaded PDF document.

Declaration

procedure Find(const AText: string; const AOptions: TdxPDFDocumentTextSearchOptions; var AFoundRanges: TdxPDFPageTextRanges); overload;

Parameters

Name Type
AText string
AOptions TdxPDFDocumentTextSearchOptions
AFoundRanges TdxPDFPageTextRanges

Remarks

The first two overloaded variants of the Find method are functions returning a search result record containing the page text range corresponding to the text string passed as the AText parameter, and the search operation status. For detailed information on text search result representation, refer to the TdxPDFDocumentTextSearchResult type description.

Unlike the first two, the third overloaded variant is a procedure that processes the entire document at once and returns an array of text ranges corresponding to the found text occurrences as the AFoundRanges parameter.

The first overloaded Find method variant uses the PDF Viewer‘s OptionsFindPanel.CaseSensitive and OptionsFindPanel.WholeWords properties as the search settings, while the other two overloaded variants allow you to pass the corresponding settings stored in the TdxPDFDocumentTextSearchOptions record fields as the AOptions parameter.

Note

Setting the HighlightSearchResults property to True forces the first two overloaded variants of the Find method to process the entire document per call, similar to the third overloaded variant (i.e., the Find procedure).

See Also