java.lang.Object | |
↳ | com.pspdfkit.document.processor.PageImage |
Represents an image to be added to a PDF page.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PageImage(Context context, Uri fileUri, PagePosition position)
Page image from an existing file.
| |||||||||||
PageImage(Bitmap bitmap, PagePosition position)
Page image from a bitmap.
| |||||||||||
PageImage(Context context, Uri fileUri, RectF rect)
Page image from an existing file.
| |||||||||||
PageImage(Bitmap bitmap, RectF rect)
Page image from a bitmap.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PagePosition |
getPosition()
Returns the page image position on the page.
| ||||||||||
RectF |
getPositionRect()
Returns the position of the page image on the page.
| ||||||||||
int |
getRotation()
Returns currently set rotation for this image.
| ||||||||||
PageZOrder |
getZOrder()
Returns the z-order of the image when added toa page.
| ||||||||||
void |
setJpegQuality(int quality)
Sets quality for image if it has to be re-compressed to JPEG.
| ||||||||||
void |
setRotation(int rotation)
Sets rotation for the added image.
| ||||||||||
void |
setZOrder(PageZOrder zOrder)
Sets Z order of the image when added, foreground or background.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
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. |
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 OutOfMemoryError so passing a file URI is preferred.
bitmap | Image bitmap. |
---|---|
position | Alignment of the image on the page. |
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.
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! |
Page image from a bitmap. It will be converted to JPEG when embedding according to JPEG quality setting.
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! |
Returns the page image position on the page.
Returns the position of the page image on the page.
Returns currently set rotation for this image.
Returns the z-order of the image when added toa page.
Sets quality for image if it has to be re-compressed to JPEG.
quality | Quality between 0 and 100, default is 98. |
---|
Sets rotation for the added image.
rotation | rotation in degrees, valid values are 0, 180, 270 and their negative counterparts. |
---|
Sets Z order of the image when added, foreground or background.
zOrder | z-order of this image when added. |
---|