Class: TextMarkupAnnot

PDFNet. TextMarkupAnnot


new TextMarkupAnnot()

A TextMarkup is a base class for highlight, underline, strikeout, and squiggly annotations.

Methods


<static> createFromAnnot(ann)

creates a TextMarkup annotation and initializes it using given annotation object.

Parameters:
Name Type Description
ann PDFNet.Annot

Annot object used to initialize the TextMarkup annotation.

Returns:

A promise that resolves to an object of type: "TextMarkupAnnot"

Type
PDFNet.TextMarkupAnnot

<static> createFromObj(d)

creates a TextMarkup annotation and initializes it using given Cos/SDF object.

Parameters:
Name Type Description
d PDFNet.Obj

The Cos/SDF object to initialze the annotation with.

Returns:

A promise that resolves to an object of type: "TextMarkupAnnot"

Type
PDFNet.TextMarkupAnnot

getQuadPoint(idx)

Returns the QuadPoint located at a certain index of the QuadPoint array. (PDF 1.6)

Parameters:
Name Type Description
idx number

The index where the QuadPoint is located. The index starts at zero and must be less than return value of GetQuadPointCount().

Returns:

A promise that resolves to the QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.

Type
PDFNet.quadpoint

getQuadPointCount()

Returns the number of QuadPoints in the QuadPoints array of the TextMarkup annotation (PDF 1.6)

Returns:

A promise that resolves to the number of QuadPoints.

Type
number

setQuadPoint(idx, qp)

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

Parameters:
Name Type Description
idx number

The index where the QuadPoint is to be located (the index is counted from 0).

qp PDFNet.quadpoint

The QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.