public abstract class

TextMarkupAnnotation

extends BaseRectsAnnotation
java.lang.Object
   ↳ com.pspdfkit.annotations.Annotation
     ↳ com.pspdfkit.annotations.BaseRectsAnnotation
       ↳ com.pspdfkit.annotations.TextMarkupAnnotation
Known Direct Subclasses

Class Overview

Abstract base-class of all text markup annotations: HighlightAnnotation, SquigglyAnnotation, UnderlineAnnotation and StrikeOutAnnotation.

Summary

[Expand]
Inherited Constants
From class com.pspdfkit.annotations.Annotation
[Expand]
Inherited Fields
From class com.pspdfkit.annotations.Annotation
Protected Constructors
TextMarkupAnnotation(int pageIndex)
Creates a text markup annotation on a page with specified number.
Public Methods
String getHighlightedText()
Returns text highlighted by this annotation.
List<TextBlock> getHighlightedTextBlocks()
Returns list of highlighted text blocks for this annotation.
void updateTransformationProperties(RectF newBoundingBox, RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e.
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.BaseRectsAnnotation
From class com.pspdfkit.annotations.Annotation
From class java.lang.Object

Protected Constructors

protected TextMarkupAnnotation (int pageIndex)

Creates a text markup annotation on a page with specified number.

Parameters
pageIndex Page number of the page on which to create this annotation.

Public Methods

public String getHighlightedText ()

Returns text highlighted by this annotation.

Returns
  • Highlighted text or an empty string if no text is highlighted.

public List<TextBlock> getHighlightedTextBlocks ()

Returns list of highlighted text blocks for this annotation.

Returns
  • List of highlighted text blocks or an empty list if no text is highlighted.

public void updateTransformationProperties (RectF newBoundingBox, RectF oldBoundingBox)

Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.

Parameters
newBoundingBox New bounding box of the annotation (in PDF points).
oldBoundingBox Old bounding box of the annotation (in PDF points).