PdfDocument.BitmapSource


public interface PdfDocument.BitmapSource extends Closeable


A source for retrieving bitmap representations of PDF pages.

Summary

Public methods

abstract @NonNull Bitmap
getBitmap(@NonNull Size scaledPageSizePx, Rect tileRegion)

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

abstract int

Inherited methods

From java.io.Closeable
abstract void

Public methods

getBitmap

abstract @NonNull Bitmap getBitmap(@NonNull Size scaledPageSizePx, Rect tileRegion)

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

Parameters
@NonNull Size scaledPageSizePx

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

Rect tileRegion

(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
@NonNull Bitmap

The bitmap representation of the page.

getPageNumber

Added in 1.0.0-alpha10
abstract int getPageNumber()