Class: CaretAnnot

PDFNet. CaretAnnot


new CaretAnnot()

A Caret annotation (PDF 1.5) is a visual symbol that indicates the presence of text edits.

Extends

  • MarkupAnnot

Methods


<static> create(doc, pos)

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

<static> createFromAnnot(ann)

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

<static> createFromObj( [d])

creates an Caret annotation and initializes it using given Cos/SDF object.
Parameters:
Name Type Argument Description
d PDFNet.Obj <optional>
The Cos/SDF object to initialze the annotation with.
Returns:
A promise that resolves to an object of type: "PDFNet.CaretAnnot"
Type
Promise.<PDFNet.CaretAnnot>

getSymbol()

Returns the paragraph symbol associated with the caret.
Returns:
A promise that resolves to the name of the symbol. This can be either "P" (Use a new paragraph symbol) or "None" (Don't use any symbol). Default value: None.
Type
Promise.<string>

setSymbol(symbol)

sets the caret symbol.
Parameters:
Name Type Description
symbol string The name of the symbol. This can be either "P" (Use a new paragraph symbol) or "None" (Don't use any symbol). Default value: None.
Returns:
Type
Promise.<void>