PageImage

constructor(@NonNull context: Context, @NonNull fileUri: Uri, @NonNull position: PagePosition)

Page image from an existing file. File may be from disk or from another content provider. Images not in JPEG format will be converted to JPEG according to quality settings.

Parameters

context

Context of the calling component.

fileUri

URI to file, may be a file URI or a content provider URI. Non-JPEG images will be converted before embedding.

position

Alignment of the image on the page.


constructor(@NonNull bitmap: Bitmap, @NonNull position: PagePosition)

Page image from a bitmap. It will be converted to JPEG when embedding according to JPEG quality setting. Note that keeping a lot of bitmaps in memory may lead to so passing a file URI is preferred.

Parameters

bitmap

Image bitmap.

position

Alignment of the image on the page.


constructor(@NonNull context: Context, @NonNull fileUri: Uri, @NonNull rect: RectF)

Page image from an existing file. File may be from disk or from another content provider. Images not in JPEG format will be converted to JPEG according to quality settings.

Parameters

context

Context of the calling component.

fileUri

URI to file, may be a file URI or a content provider URI. Non-JPEG images will be converted before embedding.

rect

Positioning rect for the image on the page in PDF points. The image will be stretched to fill the rect. Remember that PDF coordinate system has point (0, 0) in bottom left!


constructor(@NonNull bitmap: Bitmap, @NonNull rect: RectF)

Page image from a bitmap. It will be converted to JPEG when embedding according to JPEG quality setting.

Parameters

bitmap

Image bitmap.

rect

Positioning rect for the image on the page in PDF points. The image will be stretched to fill the rect. Remember that PDF coordinate system has point (0, 0) in bottom left!