new CaretAnnot()
A Caret annotation (PDF 1.5) is a visual symbol that indicates the presence of text edits.
Methods
-
<static> create(doc, pos)
-
Creates a new Caret annotation in the specified document.
Parameters:
Name Type Description doc
PDFNet.SDFDoc 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
- 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: "CaretAnnot"
- Type
- PDFNet.CaretAnnot
-
<static> createFromObj(d)
-
creates an Caret 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: "CaretAnnot"
- Type
- 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
- 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.