Annotation Provider
Handles all annotation related operations on the owning document. Retrieve it with com.pspdfkit.document.PdfDocument.getAnnotationProvider.
For RxJava based code, see the interoperability helpers in AnnotationProviderRxJava, which bridge the suspend APIs exposed here to Rx types for legacy Java integrations.
Inheritors
Types
Companion object containing constants and utilities for AnnotationProvider.
Listener for annotation update events inside AnnotationProvider.
Functions
Adds annotation to the owner PDF document asynchronously using Kotlin coroutines. The annotation will be attached to the page set in its constructor.
Adds annotation to the owner PDF document at the specified z-index. The annotation will be attached to the page set in its constructor.
Adds annotation to the owner PDF document, blocking until the operation completes.
Adds the provided annotation to the page via AnnotationProvider.addAnnotationToPage and exposes the result as a Completable.
Adds appearance stream generator to the list of global appearance stream generators.
Appends a new annotation state for the given annotation (adds it to the review history).
Creates an annotation from the Instant JSON annotation format. The JSON must contain the type, the page number and any other required properties for that type. The created annotation will be automatically added to the document, and any registered OnAnnotationUpdatedListener will be notified of the creation.
Creates an annotation via AnnotationProvider.createAnnotationFromInstantJson as a Single.
Returns all annotations of passed types in this document.
Returns all annotations of passed types in the specified page index range.
Returns all annotations of passed types in this document, blocking until the operation completes.
Returns all annotations of passed types in the specified page range, blocking until the operation completes.
Returns all annotations of the given types for the entire document as an Observable, using AnnotationProvider.getAllAnnotationsOfType.
Returns annotations of the given types for the provided page range as an Observable, using AnnotationProvider.getAllAnnotationsOfType.
Returns annotation with certain object ID on the page if it exists.
Returns annotation with certain UUID on the page if it exists, asynchronously.
Returns annotation with certain object ID on the page if it exists, blocking until the operation completes.
Returns annotation with certain UUID on the page if it exists, blocking until the operation completes.
Gets all first-level replies to a particular annotation. First-level replies are annotations that return the given annotation via Annotation.getInReplyTo. The sort order is determined by the creation date.
Returns a list of annotations on the page. For annotations not currently recognised and handled by Nutrient this returns UnknownAnnotation.
Returns annotations with given object numbers.
Returns a list of annotations on the page, blocking until the operation completes.
Returns a JSON array in string format of annotations on the page.
Returns all annotations on the given page as an Observable by bridging AnnotationProvider.getAnnotations.
Gets all flattened replies (all replies included but no nesting) to a particular annotation. The sort order is determined by the creation date.
Gets the review history of an annotation. The review history of an annotation is the list of states it has passed, for example, "Accepted", "Cancelled", and so on. This list is ordered chronologically, where the last element is the most current one according to the creation date of the annotation change.
Gets a summary information about the given annotation's review state. Suspends while the summary is retrieved off the main thread.
Gets the z-index of the provided annotation.
Returns whether there are unsaved changes to annotations in this document.
Moves the annotation with the specified z-index move action.
Moves the annotation to the specified z-index.
Removes annotation from the document. If the annotation is not attached to the document of this annotation provider, this will be a no-op. Note that when using the Replies component of Nutrient (requires extra license flag), any replies to the removed annotation will be automatically removed as well from the document.
Removes annotation from the document, blocking until the operation completes.
Remove appearance stream generator that was previously added in addAppearanceStreamGenerator.