toPdfRect

abstract fun toPdfRect(@NonNull rect: RectF, @IntRange(from = 0) pageIndex: Int): RectF

Maps a raw PDF rect to a normalized PDF rect. Converts the coordinates stored within rect from the raw PDF coordinate space of the given pageIndex to the normalized PDF coordinate space (of the same page). This method modifies rect in place.

Parameters

rect

Rect in raw PDF coordinates on the given pageIndex that should be converted to normalized PDF coordinates of the same page.

pageIndex

Target page for the conversion (0 denotes the first page).

Throws

If the specified page doesn't exist.