public class

TextMarkup

extends Markup
java.lang.Object
   ↳ com.pdftron.pdf.Annot
     ↳ com.pdftron.pdf.annots.Markup
       ↳ com.pdftron.pdf.annots.TextMarkup
Known Direct Subclasses

Class Overview

Text markup annotations shall appear as highlights, underlines, strikeouts (all PDF 1.3), or jagged ("squiggly") underlines (PDF 1.4) in the text of a document. When opened, they shall display a pop-up window containing the text of the associated note.

Summary

[Expand]
Inherited Constants
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
Public Constructors
TextMarkup(Obj d)
Creates a TextMarkup annotation and initialize it using given Cos/SDF object.
TextMarkup()
Creates an empty TextMarkup annotation.
TextMarkup(Annot annot)
Creates a TextMarkup annotation and initialize it using given annotation object.
Public Methods
QuadPoint getQuadPoint(int idx)
Get the QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.
int getQuadPointCount()
Get the number of QuadPoints in the QuadPoints array of the TextMarkup annotation.
void setQuadPoint(int idx, QuadPoint qp)
Set the QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.
[Expand]
Inherited Methods
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
From class java.lang.Object

Public Constructors

public TextMarkup (Obj d)

Creates a TextMarkup annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
d the input Cos/SDF object

public TextMarkup ()

Creates an empty TextMarkup annotation.

public TextMarkup (Annot annot)

Creates a TextMarkup annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annot the annot

Public Methods

public QuadPoint getQuadPoint (int idx)

Get the QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.

Note: An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.

Parameters
idx The index where the QuadPoint is to be located (the index is counted from 0, and continue on assendingly).
Returns
  • The QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.

public int getQuadPointCount ()

Get the number of QuadPoints in the QuadPoints array of the TextMarkup annotation.

Note: An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.

Returns
  • The number of QuadPoints.

public void setQuadPoint (int idx, QuadPoint qp)

Set the QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation. (Optional; PDF 1.6 )

Note: To make this QuadPoint compatible with Adobe Acrobat|Reader, you can use either clockwise or counterclockwise order, but the points p3 and p4 must be swapped. This is because those readers do not follow the PDF specification for TextMarkup QuadPoints. An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.

Parameters
idx The index where the QuadPoint is to be located (the index is counted from 0, and continue on assendingly).
qp The QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.