RedactionAnnotation

Represents a redaction annotation on the document. The text marked by this annotation will be completely removed once the redaction is applied. To mark text for redaction just place the RedactionAnnotation above the text, you can use getPageTextRects to find the correct bounds for the text. Any glyphs that intersect the redaction bounding box will be redacted, they don't need to be covered completely. Call applyRedactions to apply the redactions persistently.

NOTE: This requires the Redaction component license to use.

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rects: List<RectF>)
Creates a new redaction annotation.
constructor(@NonNull properties: AnnotationPropertyManager, markDirty: Boolean)
Intended for internal usage only.

Functions

Link copied to clipboard
Returns a fill color associated with this redaction or Color#BLACK if no color is set.
Link copied to clipboard
Returns the color used for the redaction's border in its preview state.
Link copied to clipboard
Returns the text that should be displayed at the specified rects when a redaction has been applied.
Link copied to clipboard
Gets the annotation type of the annotation.
Link copied to clipboard
open fun setOutlineColor(@ColorInt outlineColor: Int)
Sets the color used for the redaction's border in its preview state, this color can't be transparent and any alpha information will be removed before applying it.
Link copied to clipboard
open fun setOverlayText(@Nullable overlayText: String)
Sets the text that should be displayed at the specified rects when a redaction has been applied.
Link copied to clipboard
open fun setRepeatOverlayText(repeatOverlayText: Boolean)
Defines whether the overlay text should be drawn only once, or repeated to fill the whole bounding box.
Link copied to clipboard
Returns false if the overlay text should be drawn only once, or true if it is repeated to fill the whole bounding box.
Link copied to clipboard
open fun updateTransformationProperties(@NonNull newBoundingBox: RectF, @NonNull oldBoundingBox: RectF)
Annotations may override this method to transform their properties (i.e.