Pdf Library
class PdfLibrary
PdfLibrary implements a SQLite-based full-text-search engine. You can register documents to be indexed in the background and then search for keywords within that collection. There can be multiple libraries, although usually one is enough for the common use case.
See also
<a
href="https://pspdfkit.com/guides/android/current/features/indexed-full-text-search/">Indexed Full text search
Properties
Functions
Link copied to clipboard
Adds a LibraryIndexingListener to monitor document indexing status.
Link copied to clipboard
Completely clears the index for this library.
Link copied to clipboard
open fun enqueueDocuments(@NonNull documents: List<PdfDocument>, @NonNull indexingOptions: IndexingOptions)
Queues an array of documents for indexing.
Link copied to clipboard
Queues an array of documents for indexing.
Link copied to clipboard
open fun enqueueDocumentSourcesWithMetadata(@NonNull documentSources: List<Pair<DocumentSource, Array<Byte>>>)
Queues an array of documents for indexing together with passed free-form metadata.
Link copied to clipboard
open fun enqueueDocumentsWithMetadata(@NonNull documents: List<Pair<PdfDocument, Array<Byte>>>, @NonNull indexingOptions: IndexingOptions)
Queues an array of documents for indexing together with passed free-form metadata.
Link copied to clipboard
Returns list of UIDs of documents currently indexed.
Link copied to clipboard
Returns indexing status for a document with passed UID.
Link copied to clipboard
Returns metadata appended to document with enqueueDocumentsWithMetadata call.
Link copied to clipboard
Returns list of UIDs of documents queued for indexing.
Link copied to clipboard
Indicates whether saving the reverse text is enabled.
Link copied to clipboard
Indicates whether the indexing is in progress or not.
Link copied to clipboard
Invalidates index for documents.
Link copied to clipboard
Removes a registered LibraryIndexingListener added with addLibraryIndexingListener.
Link copied to clipboard
open fun search(@NonNull searchString: String, @Nullable options: QueryOptions, @NonNull resultListener: QueryResultListener)
Query the database for a match of searchString.
Link copied to clipboard
Will save a reversed copy of the original page text.
Link copied to clipboard
Stops search and all in-progress preview text generator tasks.