Properties

Link copied to clipboard
Custom AP stream generator for this annotation.
Link copied to clipboard
Default border width when none is set.
Link copied to clipboard
Default border effect intensity for cloudy borders.
Link copied to clipboard
Annotation that this annotation replies to.
Link copied to clipboard
val OBJECT_NUMBER_NOT_SET: Int = -2147483648
Return value for when the annotation doesn't have a set object number.
Link copied to clipboard
val PAGE_NUMBER_NOT_SET: Int = -2147483648
Return value for when the annotation doesn't have a set page number.

Functions

Link copied to clipboard
Attaches a binary instant JSON attachment to the annotation.
Link copied to clipboard

Creates TextBlock from textual annotation.

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
If this annotation has a binary instant JSON attachment, this will write it into the provided OutputStream.
Link copied to clipboard
Regenerates the annotation's appearance stream if necessary.
Link copied to clipboard
open fun generateAppearanceStreamAsync(): Completable
Regenerates the annotation's appearance stream if necessary.
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
open fun getAlpha(): Float
Returns the annotation's main alpha (or stroke alpha).
Link copied to clipboard
Returns currently set blend mode.
Link copied to clipboard
Returns the border color of this annotation or Color#TRANSPARENT if no color is set.
Link copied to clipboard
Returns currently set dash array or null if no pattern is set.
Link copied to clipboard
Returns the current border effect on the annotation or NO_EFFECT if none is set.
Link copied to clipboard
@FloatRange(from = 0.0)
open fun getBorderEffectIntensity(): Float
Returns the current border effect intensity.
Link copied to clipboard
Returns the current border style on the annotation or NONE if none is set.
Link copied to clipboard
open fun getBorderWidth(): Float
Returns the border line width / thickness.
Link copied to clipboard
Position of this annotation on the page.
Link copied to clipboard
open fun getColor(): Int
Returns a color associated with this annotation or Color#TRANSPARENT if no color is set.
Link copied to clipboard
Returns text contents of the annotation.
Link copied to clipboard
open fun getCopy(@IntRange(from = 0) pageIndex: Int): Annotation
Creates a copy of this annotation that isn't attached to the document with the page index set to given index.
Link copied to clipboard
Returns the creation date of the annotation.
Link copied to clipboard
Returns the name of the creator of this annotation.
Link copied to clipboard
Retrieves custom data for the annotation.
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
open fun getFillAlpha(): Float
Returns the fill alpha.
Link copied to clipboard
Returns a fill color associated with this object or Color#TRANSPARENT if no color is set.
Link copied to clipboard
Annotation flags set.
Link copied to clipboard
Returns the group string of the annotation.
Link copied to clipboard
Retrieves the annotation this annotation replies to asynchronously.
Link copied to clipboard
Gets instant record group of the annotation, or null if this annotation is detached.
Link copied to clipboard
open fun getInternal(): InternalAnnotationApi
Gets APIs for restricted internal usage only.
Link copied to clipboard
Returns MeasurementInfo when the annotation is a measurement annotation (see isMeasurement, null if not.
Link copied to clipboard
Returns the minimum size of the annotation.
Link copied to clipboard
Returns the date when this annotation was last modified.
Link copied to clipboard
open fun getName(): String
Returns the content of Title/Name field of this annotation.
Link copied to clipboard
open fun getObjectNumber(): Int
The object number of this annotation inside the PDF document file.
Link copied to clipboard
open fun getPageIndex(): Int
The page number to which this annotation belongs.
Link copied to clipboard
Returns rich text contents of the annotation.
Link copied to clipboard
Returns the subject of this annotation.
Link copied to clipboard
Gets the annotation type of the annotation.
Link copied to clipboard
open fun getUuid(): String
A unique in-memory identifier for each annotation.
Link copied to clipboard
Checks if this annotation has a binary instant JSON attachment.
Link copied to clipboard
Test annotation flag.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Check if the annotation has locked contents - i.e.
Link copied to clipboard
open fun isAttached(): Boolean
Tells whether this annotation is attached to a document.
Link copied to clipboard
open fun isLocked(): Boolean
Check if the annotation is locked - i.e.
Link copied to clipboard
Returns true when the annotation is a measurement annotation.
Link copied to clipboard
open fun isModified(): Boolean
Returns whether the annotation is modified or not.
Link copied to clipboard
open fun isReply(): Boolean
Whether the annotations is a reply to another annotation.
Link copied to clipboard
open fun isResizable(): Boolean
Check if the annotation is resizable, or if this is a non-resizable annotation.
Link copied to clipboard
open fun isSignature(): Boolean
Returns true when the annotation is a signature annotation.
Link copied to clipboard
Returns true if this Annotation can be rotated in the UI.
Link copied to clipboard
Creates random string to be used as a group name.
Link copied to clipboard
open fun renderToBitmap(@NonNull bitmap: Bitmap)
open fun renderToBitmap(@NonNull bitmap: Bitmap, @NonNull configuration: AnnotationRenderConfiguration)
Renders the appearance of this annotation into the passed bitmap.
Link copied to clipboard
open fun renderToBitmapAsync(@NonNull bitmap: Bitmap): Single<Bitmap>
Asynchronously renders the appearance of this annotation into the passed bitmap.
Link copied to clipboard
open fun setAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float)
Sets the annotation's alpha (or stroke alpha) value.
Link copied to clipboard
open fun setBlendMode(@NonNull blendMode: BlendMode)
Sets the blend mode used when generating annotation's appearance stream.
Link copied to clipboard
open fun setBorderColor(@ColorInt color: Int)
Sets the border color for this annotation.
Link copied to clipboard
Sets a dash style for the border.
Link copied to clipboard
open fun setBorderEffect(@NonNull borderEffect: BorderEffect)
Sets a border effect for current annotation.
Link copied to clipboard
open fun setBorderEffectIntensity(@FloatRange(from = 0.0) borderEffectIntensity: Float)
Sets border effect intensity.
Link copied to clipboard
open fun setBorderStyle(@NonNull borderStyle: BorderStyle)
Sets a border style for current annotation.
Link copied to clipboard
open fun setBorderWidth(@FloatRange(from = 0.0) borderWidth: Float)
Sets border line width / thickness.
Link copied to clipboard
open fun setBoundingBox(@NonNull newBoundingBox: RectF)
Sets the position and size of this annotation on the page.
Link copied to clipboard
open fun setColor(@ColorInt color: Int)
Sets the color for this annotation.
Link copied to clipboard
open fun setContents(@Nullable contents: String)
Sets text contents of the annotation.
Link copied to clipboard
open fun setContentSize(@Nullable contentSize: RectF, adjustedForPageRotation: Boolean)
Sets the inner bounds that are used when rotating the annotation.
Link copied to clipboard
open fun setCreatedDate(@Nullable createdDate: Date)
Sets created date for this annotation.
Link copied to clipboard
open fun setCreator(@Nullable creator: String)
Sets the creator of this annotation.
Link copied to clipboard
open fun setCustomData(@Nullable customData: JSONObject)
Sets custom data to the annotation.
Link copied to clipboard
open fun setFillAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float)
Sets the annotation's fill alpha value if supported.
Link copied to clipboard
open fun setFillColor(@ColorInt color: Int)
Sets the fill color for this annotation.
Link copied to clipboard
Sets annotation flags.
Link copied to clipboard
open fun setGroup(@Nullable group: String)
Sets the group of the annotation.
Link copied to clipboard
Set the minimum size for the specified annotation type in PDF points.
Link copied to clipboard
open fun setModifiedDate(@Nullable modifiedDate: Date)
Sets last modified date for this annotation.
Link copied to clipboard
open fun setName(@Nullable name: String)
Sets Title / Name field for this annotation
Link copied to clipboard
open fun setRichText(@Nullable richText: String)
Sets rich text contents of the annotation.
Link copied to clipboard
open fun setSubject(@Nullable subject: String)
Sets the subject of this annotation.
Link copied to clipboard
Produces Instant JSON representation of this annotation.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
abstract fun updateTransformationProperties(@NonNull newBoundingBox: RectF, @NonNull oldBoundingBox: RectF)
Annotations may override this method to transform their properties (i.e.