SearchResult

Represents a result found when searching for text.

See also

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull textBlock: TextBlock, @Nullable snippet: SearchResult.TextSnippet, @Nullable annotation: Annotation, @NonNull document: PdfDocument)
Private constructor.

Types

Link copied to clipboard
The TextSnippet can be extracted with a search result to present a preview text to the user.

Properties

Link copied to clipboard
Annotation that contains the search result.
Link copied to clipboard
Link copied to clipboard
@IntRange(from = 0)
val pageIndex: Int
Page number of the page holding the search result.
Link copied to clipboard
Search result snippet (preview text).
Link copied to clipboard
The search result text (containing the actual string, indices and text coordinates).

Functions

Link copied to clipboard
open fun compareTo(@NonNull another: SearchResult): Int
Link copied to clipboard
open fun create(@NonNull document: PdfDocument, @NonNull annotation: Annotation, @NonNull range: Range, @IntRange(from = 0) snippetLength: Int): SearchResult
Create an immutable search result with a preview snippet from annotation text.
open fun create(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull range: Range, @IntRange(from = 0) snippetLength: Int): SearchResult
Creates an immutable search result with a preview snippet from page text
Link copied to clipboard
open fun toString(): String