scrollTo

open fun scrollTo(@NonNull pdfRect: RectF, @IntRange(from = 0) pageIndex: Int, duration: Long, scrollWhenVisible: Boolean)

Scrolls to the given pdfRect, if necessary changing to the page. This will keep the current zoom level. If scrollWhenVisible is false this method will be a no-op if the pdfRect is already completely visible.

Parameters

pdfRect

Target area.

pageIndex

Page which should be scrolled to.

duration

Scroll animation duration (in milliseconds).

scrollWhenVisible

Whether scrolling should be performed if the target area is already completely visible, or not.