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
data class FormListener(    val addOnFormElementClickedListener: (formElement: FormElement) -> Boolean? = null,     val addOnFormElementViewUpdatedListener: (formElement: FormElement) -> Boolean? = null,     val addOnFormElementValidationSuccess: (formElement: FormElement) -> Boolean? = null,     val addOnFormElementValidationFailed: (formElement: FormElement, validationError: String) -> Boolean? = null,     val addOnEnterFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null,     val addOnChangeFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null,     val addOnExitFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null,     val addOnFormElementUpdatedListener: (formElement: FormElement) -> Boolean? = null,     val addOnFormElementDeselectedListener: (formElement: FormElement, reselected: Boolean) -> Boolean? = null,     val addOnFormElementSelectedListener: (formElement: FormElement) -> Boolean? = null)

Wrapper for holding FormListener callbacks

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(),     formListener: FormListener = DefaultListeners.formListeners()): DocumentManager

Default helper method to get DocumentManager instance.

Link copied to clipboard
fun rememberDocumentState(    documentUri: Uri,     configuration: PdfActivityConfiguration = PdfActivityConfiguration.Builder(LocalContext.current).build()): DocumentState
fun rememberDocumentState(dataProvider: DataProvider, 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.

Link copied to clipboard
fun rememberImageDocumentState(    documentUri: Uri,     configuration: PdfActivityConfiguration = PdfActivityConfiguration.Builder(LocalContext.current).build()): DocumentState
fun rememberImageDocumentState(    dataProvider: DataProvider,     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.ImageDocumentView. Returns a Saver containing the DocumentState, used for remembering the state of a given document.