PdfDocument.BitmapSource


interface PdfDocument.BitmapSource : Closeable


A source for retrieving bitmap representations of PDF pages.

Summary

Public functions

suspend Bitmap
getBitmap(scaledPageSizePx: Size, tileRegion: Rect?)

Asynchronously retrieves a bitmap representation of the page, optionally constrained to a specific tile region.

Public properties

Int

Inherited functions

From java.io.Closeable

Public functions

getBitmap

suspend fun getBitmap(scaledPageSizePx: Size, tileRegion: Rect? = null): Bitmap

Asynchronously retrieves a bitmap representation of the page, optionally constrained to a specific tile region.

Parameters
scaledPageSizePx: Size

The scaled page size in pixels, representing the page size in case of no zoom, and scaled page size in case of zooming.

tileRegion: Rect? = null

(Optional) The region of the page to include in the bitmap, in pixels within the scaledPageSizePx. This identifies the tile. If null, the entire page is included.

Returns
Bitmap

The bitmap representation of the page.

Public properties

pageNumber

Added in 1.0.0-alpha10
val pageNumberInt