toAnnotation

fun toAnnotation(document: PdfDocument, @IntRange(from = 0) pageIndex: Int, touchPoint: PointF): Annotation

Builds InkAnnotation or StampAnnotation from signature data.

Return

InkAnnotation or StampAnnotation representing this signature.

Parameters

document

Target document where the annotation will be added to.

pageIndex

Target page index in document where the annotation will be added to.

touchPoint

Point where the annotation should be created.


fun toAnnotation(document: PdfDocument, @IntRange(from = 0) pageIndex: Int, targetRect: RectF): Annotation

Builds InkAnnotation or StampAnnotation from signature data.

Return

InkAnnotation or StampAnnotation representing this signature.

Parameters

document

Target document where the annotation will be added to.

pageIndex

Target page index in document where the annotation will be added to.

targetRect

Rect on the page into which the annotation should be fitted.


fun toAnnotation(@IntRange(from = 0) pageIndex: Int): Annotation

Builds InkAnnotation or StampAnnotation from signature data. If you want to create a stamp annotation with a specific bounding box around certain touch point, use toAnnotation instead.

Return

Stamp annotation representing this signature, or null if class is not an image signature.

Parameters

pageIndex

Target page index where the annotation will be added to.