Class TextSearch
-
- All Implemented Interfaces:
public final class TextSearch
Searches text inside a PdfDocument.
-
-
Constructor Summary
Constructors Constructor Description TextSearch(PdfDocument document, PdfConfiguration configuration)
Creates a TextSearch instance to search the given document
.
-
Method Summary
Modifier and Type Method Description List<SearchResult>
performSearch(@NonNull() String searchString)
Performs a search on the loaded document, returning a list of all search results. List<SearchResult>
performSearch(@NonNull() String searchString, @NonNull() SearchOptions searchOptions)
Performs a search on the loaded document, returning a list of all search results. Flowable<SearchResult>
performSearchAsync(@NonNull() String searchString)
Performs a search on the loaded document. Flowable<SearchResult>
performSearchAsync(@NonNull() String searchString, @NonNull() SearchOptions searchOptions)
Performs a search on the loaded document. -
-
Constructor Detail
-
TextSearch
TextSearch(PdfDocument document, PdfConfiguration configuration)
Creates a TextSearch instance to search the givendocument
.- Parameters:
document
- The PdfDocument to be searched.
-
-
Method Detail
-
performSearch
@NonNull() List<SearchResult> performSearch(@NonNull() String searchString)
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.
- Parameters:
searchString
- Text to find in the document.
-
performSearch
@NonNull() List<SearchResult> performSearch(@NonNull() String searchString, @NonNull() SearchOptions searchOptions)
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.
- Parameters:
searchString
- Text to find in the document.searchOptions
- Options for performing search.
-
performSearchAsync
@NonNull() Flowable<SearchResult> performSearchAsync(@NonNull() String searchString)
Performs a search on the loaded document. The returned flowable will emit search results or an error if search failed for some reason. The returned flowable uses
BackpressureStrategy#BUFFER
. This method will use the default search options.- Parameters:
searchString
- Text to find in the document.
-
performSearchAsync
@NonNull() Flowable<SearchResult> performSearchAsync(@NonNull() String searchString, @NonNull() SearchOptions searchOptions)
Performs a search on the loaded document. The returned flowable will emit search results or an error if search failed for some reason. The returned flowable uses
BackpressureStrategy#BUFFER
.- Parameters:
searchString
- Text to find in the document.searchOptions
- Options for performing search.
-
-
-
-