TextSearch

class TextSearch(document: PdfDocument, configuration: PdfConfiguration)

Searches text inside a PdfDocument.

Constructors

Link copied to clipboard
constructor(document: PdfDocument, configuration: PdfConfiguration)

Functions

Link copied to clipboard

Whether the most recently finished search ended before visiting every page because the process was running low on memory. When true, the delivered results are partial: more matches may exist in the pages that were not searched. This is reset to false when a new search starts.

Link copied to clipboard
fun performSearch(searchString: String): List<SearchResult>

Performs a search on the loaded document, returning a list of all search results. This method will use the default search options. If search does not find any results, this method will return an empty list.

fun performSearch(searchString: String, searchOptions: SearchOptions): List<SearchResult>

Performs a search on the loaded document, returning a list of all search results. If search does not find any results, this method will return an empty list.

Link copied to clipboard
fun performSearchAsync(searchString: String): Flow<SearchResult>

Performs a search on the loaded document. The returned Flow emits search results, or fails with an error if search failed for some reason. This method will use the default search options.

fun performSearchAsync(searchString: String, searchOptions: SearchOptions): Flow<SearchResult>

Performs a search on the loaded document. The returned Flow emits search results, or fails with an error if search failed for some reason.