Class: HighlightAnnot

PDFNet. HighlightAnnot


new HighlightAnnot()

A Highlight annotation covers a word or a group of contiguous words with partially transparent color.

Extends

  • TextMarkupAnnot

Methods


<static> create(doc, pos)

Creates a new Highlight annotation in the specified document.
Parameters:
Name Type Description
doc PDFNet.PDFDoc | PDFNet.SDFDoc | PDFNet.FDFDoc A document to which the Highlight annotation is added.
pos PDFNet.Rect A rectangle specifying the Highlight annotation's bounds in default user space units.
Returns:
A promise that resolves to a newly created blank Highlight annotation.
Type
Promise.<PDFNet.HighlightAnnot>

<static> createFromAnnot(ann)

creates a Highlight annotation and initializes it using given annotation object.
Parameters:
Name Type Description
ann PDFNet.Annot Annot object used to initialize the Highlight annotation.
Returns:
A promise that resolves to an object of type: "PDFNet.HighlightAnnot"
Type
Promise.<PDFNet.HighlightAnnot>

<static> createFromObj(d)

creates a Highlight 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: "PDFNet.HighlightAnnot"
Type
Promise.<PDFNet.HighlightAnnot>