public interface

LibraryIndexingListener

com.pspdfkit.document.library.LibraryIndexingListener

Class Overview

Listener to monitor indexing progress.

Summary

Public Methods
abstract boolean enableOnPageIndexedEvents()
Whether onPageIndexed(String, int, String) callback should be called for each page indexed.
abstract void onFinishIndexingDocument(String documentUID, boolean success)
Called when a document finishes indexing.
abstract void onPageIndexed(String documentUID, int pageIndex, String text)
Called for each page indexed if enableOnPageIndexedEvents() returns true.
abstract void onStartIndexingDocument(String documentUID)
Called when a document starts indexing.

Public Methods

public abstract boolean enableOnPageIndexedEvents ()

Whether onPageIndexed(String, int, String) callback should be called for each page indexed.

NOTE: This may significantly slow down the indexing progress. Should return false if this information is not needed.

Returns
  • true if progress should be reported for each page indexed.

public abstract void onFinishIndexingDocument (String documentUID, boolean success)

Called when a document finishes indexing.

Parameters
documentUID document UID of the document that finished indexing.
success true if document indexing finished successfully.

public abstract void onPageIndexed (String documentUID, int pageIndex, String text)

Called for each page indexed if enableOnPageIndexedEvents() returns true.

Parameters
documentUID document UID of the document that's indexing.
pageIndex 0-indexed page index of the page processed.
text text on the page that was indexed into the library.

public abstract void onStartIndexingDocument (String documentUID)

Called when a document starts indexing.

Parameters
documentUID document UID of the document that started indexing.