Method FindTextAsync
FindTextAsync(string, string, string, TextSearchOptions, CancellationToken)
Searches text in a PDF file and returns matching regions with snippets.
public static Task<PdfTextSearchResult> FindTextAsync(string inputPath, string query, string pageRange = null, TextSearchOptions textOptions = null, CancellationToken cancellationToken = default)
Parameters
inputPathstringPath to the PDF file.
querystringText query to search for.
pageRangestringOptional page range (for example:
"1-5","1,3,5").textOptionsTextSearchOptionsText search options applied by LayoutSearchEngine.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<PdfTextSearchResult>
A task containing a PdfTextSearchResult with summary and matches.