Package-level declarations

Types

Link copied to clipboard
class AnnotationListener(val onPrepareAnnotationSelection: (AnnotationSelectionController, Annotation, Boolean) -> Boolean? = null, val onAnnotationSelected: (Annotation, Boolean) -> Unit? = null, val onAnnotationSelectionFinished: (List<Annotation>, Boolean) -> Unit? = null, val onAnnotationDeselected: (Annotation, Boolean) -> Unit? = null)

Wrapper for holding AnnotationListener callbacks

Link copied to clipboard

Contains the default values used by com.pspdfkit.jetpack.compose.views.DocumentView

Link copied to clipboard

This acts as a bridge between PdfFragment and DocumentView to access respective functionalities.

Link copied to clipboard
class DocumentListener(val onDocumentLoaded: (PdfDocument) -> Unit? = null, val onDocumentLoadFailed: (Throwable) -> Unit? = null, val onDocumentSave: (PdfDocument, DocumentSaveOptions) -> Boolean? = null, val onDocumentSaved: (PdfDocument) -> Unit? = null, val onDocumentSaveFailed: (PdfDocument, Throwable) -> Unit? = null, val onDocumentSaveCancelled: (PdfDocument?) -> Unit? = null, val onPageClick: (PdfDocument, Int, MotionEvent?, PointF?, Annotation?) -> Boolean? = null, val onDocumentClick: () -> Boolean? = null, val onPageChanged: (PdfDocument, Int) -> Unit? = null, val onDocumentZoomed: (PdfDocument, Int, Float) -> Unit? = null, val onPageUpdated: (PdfDocument, Int) -> Unit? = null)

Wrapper for holding all DocumentListener callbacks

Link copied to clipboard
interface DocumentManager

Contains all types of listeners provided to com.pspdfkit.jetpack.compose.views.DocumentView

Link copied to clipboard

A state object that can be hoisted to control and observe properties of the com.pspdfkit.jetpack.compose.views.DocumentView. Create instances of this object using rememberDocumentState.

Link copied to clipboard
class UiListener(val onImmersiveModeEnabled: (Boolean) -> Unit? = null, val onDocumentScroll: (ScrollState) -> Unit? = null)

Wrapper for holding UiListener callbacks

Functions

Link copied to clipboard
fun getDefaultDocumentManager(documentListener: DocumentListener = DefaultListeners.documentListeners(), annotationListener: AnnotationListener = DefaultListeners.annotationListeners(), uiListener: UiListener = DefaultListeners.uiListeners()): DocumentManager

Default helper method to get DocumentManager instance.

Link copied to clipboard
Link copied to clipboard
fun rememberDocumentState(documentUri: Uri, configuration: PdfActivityConfiguration = PdfActivityConfiguration.Builder(LocalContext.current).build()): DocumentState

A state object that can be hoisted to control and observe properties of the com.pspdfkit.jetpack.compose.views.DocumentView. Returns a Saver containing the DocumentState, used for remembering the state of a given document.