PdfDocumentCheckpointer

Handles documents checkpoint, cleaning and saving strategy.

Constructors

Link copied to clipboard
constructor(@NonNull document: InternalPdfDocument, @NonNull checkpointFile: File, @NonNull configuration: CheckpointerConfiguration)

Properties

Link copied to clipboard
Strategy used for storing the checkpoint.

Functions

Link copied to clipboard
Checks if a checkpoint for the document exists.
Link copied to clipboard
Deletes all checkpoints stored on-disk.
Link copied to clipboard
Deletes the checkpoint if exists.
Link copied to clipboard
Asynchronously deletes the checkpoint.
Link copied to clipboard
Logs that the saving succeeded and resets the dirty status of the document to false.
Link copied to clipboard
Returns true if the checkpoint is supported.
Link copied to clipboard
open fun isDirty(): Boolean
Returns true if the document has been modified since the last saving.
Link copied to clipboard
open fun isSaving(): Boolean
Returns whether or not the checkpointer is currently saving to the document.
Link copied to clipboard
open fun onAnnotationCreated(@NonNull annotation: Annotation)
Called when annotation has been created.
Link copied to clipboard
open fun onAnnotationRemoved(@NonNull annotation: Annotation)
Called when existing annotation has been removed.
Link copied to clipboard
open fun onAnnotationUpdated(@NonNull annotation: Annotation)
Called when existing annotation has changed.
Link copied to clipboard
open fun onAnnotationZOrderChanged(pageIndex: Int, @NonNull oldOrder: List<Annotation>, @NonNull newOrder: List<Annotation>)
Called when the z-order of annotations has changed on a specified page.
Link copied to clipboard
Saves the checkpoint persistently on the local storage.
Link copied to clipboard
open fun saveCheckpointAsync(): Single<Boolean>
Saves the checkpoint asynchronously.
Link copied to clipboard
open fun setCheckpointPath(@NonNull context: Context, @NonNull documentSource: DocumentSource, @NonNull checkpointFolder: String): List<DocumentSource>
Creates a local path for saving the checkpoint file.