getPageToViewTransformation

abstract fun getPageToViewTransformation(@IntRange(from = 0) pageIndex: Int, @Nullable reuse: Matrix): Matrix

Returns a Matrix for transforming PDF coordinates to view coordinates. The matrix can be used to map coordinates on the PDF page at pageIndex to view coordinates on the fragment. Note that this method may throw IllegalStateException if no document has been loaded yet, or if the requested page is not yet part of the fragment's view hierarchy.

Return

Transformation matrix for converting page coordinates to view coordinates.

Parameters

pageIndex

Number of the page for which to retrieve the transformation (starting at 0).

reuse

A matrix object to reuse for calculation. May be null if a new matrix should be created.

Throws

if there is no transformation for the given page (e.g. the document is not yet loaded, or the specified page doesn't exist).