on Page Click
open fun onPageClick(@NonNull document: PdfDocument, @IntRange(from = 0 ) pageIndex: Int, @Nullable event: MotionEvent, @Nullable pagePosition: PointF, @Nullable clickedAnnotation: Annotation): Boolean
Called when user taps / clicks on the page.
Return
true
if tap was handled by this DocumentListener
and should not be handled by PSPDFKit anymore. If returning false
PSPDFKit will continue executing it's default action.
Parameters
document
Currently opened document.
page Index
Page number of the page being tapped.
event
MotionEvent that triggered this page click. May be null
if this page click was triggered from keyboard or accessibility event.
page Position
Tapped page position (in PDF page coordinates with origin on bottom left). Coordinates passed here may exceed the page size (which is returned by getPageSize) and can also be negative. If the click was triggered by the keyboard, pagePosition
will be null
.
clicked Annotation
Annotation that was tapped, or null
if no annotation was tapped.