StampAnnotation
class StampAnnotation : PdfAnnotation
kotlin.Any | ||
↳ | android.graphics.pdf.component.PdfAnnotation | |
↳ | android.graphics.pdf.component.StampAnnotation |
Represents a stamp annotation in a PDF document.
Only path, image, or text objects created using the PdfPagePathObject
, PdfPageImageObject
, or PdfPageTextObject
constructors respectively can be added to a stamp annotation.
Summary
Public constructors | |
---|---|
StampAnnotation(bounds: RectF) Creates a new stamp annotation with the specified bounds. |
Public methods | |
---|---|
Unit |
addObject(pageObject: PdfPageObject) Adds a PDF page object to the stamp annotation. |
RectF |
Returns the bounding rectangle of the stamp annotation. |
MutableList<PdfPageObject!> |
Returns all the known PDF page objects in the stamp annotation. |
Unit |
removeObject(index: Int) Remove the page object at the given index inside the stamp annotation. |
Unit |
Sets the bounding rectangle of the stamp annotation. |
Inherited functions | |
---|---|
Public constructors
StampAnnotation
StampAnnotation(bounds: RectF)
Creates a new stamp annotation with the specified bounds.
The list of page objects inside the stamp annotation will be empty by default
Parameters | |
---|---|
bounds |
RectF: The bounding rectangle of the annotation. This value cannot be null . |
Public methods
addObject
fun addObject(pageObject: PdfPageObject): Unit
Adds a PDF page object to the stamp annotation.
The page object should be a path, text or an image.
Parameters | |
---|---|
pageObject |
PdfPageObject: The PDF page object to add. This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the page object is already added to a page or an annotation. |
getBounds
fun getBounds(): RectF
Returns the bounding rectangle of the stamp annotation.
Return | |
---|---|
RectF |
The bounding rectangle. This value cannot be null . |
getObjects
fun getObjects(): MutableList<PdfPageObject!>
Returns all the known PDF page objects in the stamp annotation.
Return | |
---|---|
MutableList<PdfPageObject!> |
The list of page objects in the annotation. This value cannot be null . |
removeObject
fun removeObject(index: Int): Unit
Remove the page object at the given index inside the stamp annotation. Here index is the index of the page object in the list of page objects returned by getObjects()
Parameters | |
---|---|
index |
Int: - index of the object to be removed Value is 0 or greater |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if there is no object in the annotation with the given id |
setBounds
fun setBounds(bounds: RectF): Unit
Sets the bounding rectangle of the stamp annotation.
Parameters | |
---|---|
bounds |
RectF: The new bounding rectangle. This value cannot be null . |