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 onFormElementClickedListener: (formElement: FormElement) -> Boolean? = null, val onFormElementViewUpdatedListener: (formElement: FormElement) -> Boolean? = null, val onFormElementValidationSuccess: (formElement: FormElement) -> Boolean? = null, val onFormElementValidationFailed: (formElement: FormElement, validationError: String) -> Boolean? = null, val onEnterFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null, val onChangeFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null, val onExitFormElementEditingMode: (formEditingController: FormEditingController) -> Boolean? = null, val onFormElementUpdatedListener: (formElement: FormElement) -> Boolean? = null, val onFormElementDeselectedListener: (formElement: FormElement, reselected: Boolean) -> Boolean? = null, val onFormElementSelectedListener: (formElement: FormElement) -> Boolean? = null, val onIsFormElementClickableListener: (formElement: FormElement) -> Boolean? = null, val onPrepareFormElementSelection: (formElement: FormElement) -> Boolean? = null)

Wrapper for holding FormListener callbacks

Link copied to clipboard
class InstantDocumentListener(val onAuthenticationFailed: (InstantPdfDocument, InstantException) -> Unit? = null, val onAuthenticationFinished: (InstantPdfDocument, String) -> Unit? = null, val onSyncStarted: (InstantPdfDocument) -> Unit? = null, val onSyncError: (InstantPdfDocument, InstantException) -> Unit? = null, val onSyncFinished: (InstantPdfDocument) -> Unit? = null, val onDocumentStateChanged: (InstantPdfDocument, InstantDocumentState) -> Unit? = null, val onDocumentCorrupted: (InstantPdfDocument) -> Unit? = null, val onDocumentInvalidated: (InstantPdfDocument) -> Unit? = null)

Wrapper for holding InstantDocumentListener callbacks

Link copied to clipboard
Link copied to clipboard
class UiListener(val onUiVisible: (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 getDefaultInstantDocumentManager(documentListener: DocumentListener = DefaultListeners.documentListeners(), annotationListener: AnnotationListener = DefaultListeners.annotationListeners(), uiListener: UiListener = DefaultListeners.uiListeners(), formListener: FormListener = DefaultListeners.formListeners(), instantListener: InstantDocumentListener = DefaultListeners.instantListeners()): InstantDocumentManager

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.

Link copied to clipboard
fun rememberInstantDocumentState(serverUrl: String, jwt: String, configuration: PdfActivityConfiguration = PdfActivityConfiguration.Builder(LocalContext.current).build()): DocumentState