new SquareAnnot()
Square annotation is used to display a rectangle on the page. When opened, a square annotation can display a pop-up window containing the text of the associated note. The rectangle may be inscribed and possibly padded within the annotation rectangle defined by the annotation dictionary's Rect entry.
Methods
-
<static> create(doc, pos)
-
Creates a new Square annotation in the specified document.
Parameters:
Name Type Description doc
PDFNet.SDFDoc A document to which the annotation is added.
pos
PDFNet.Rect A rectangle specifying the annotation's bounds, in user space coordinates.
Returns:
A promise that resolves to a newly created blank Square annotation.
- Type
- PDFNet.SquareAnnot
-
<static> createFromAnnot(ann)
-
creates a Square annotation and initializes it using given annotation object.
Parameters:
Name Type Description ann
PDFNet.Annot Annot object used to initialize the Square annotation.
Returns:
A promise that resolves to an object of type: "SquareAnnot"
- Type
- PDFNet.SquareAnnot
-
<static> createFromObj(d)
-
creates an Square 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: "SquareAnnot"
- Type
- PDFNet.SquareAnnot
-
getContentRect()
-
Returns:
A promise that resolves to an object of type: "rect"
- Type
- PDFNet.Rect
-
getInteriorColor()
-
Returns:
A promise that resolves to an object of type: "colorpt"
- Type
- PDFNet.ColorPt
-
getInteriorColorCompNum()
-
Returns:
A promise that resolves to an object of type: "number"
- Type
- number
-
getPadding()
-
Returns:
A promise that resolves to an object of type: "rect"
- Type
- PDFNet.Rect
-
setContentRect(cr)
-
Parameters:
Name Type Description cr
PDFNet.Rect -
setInteriorColor(col, numcomp)
-
Parameters:
Name Type Description col
PDFNet.ColorPt numcomp
number -
setInteriorColorDefault(col)
-
Parameters:
Name Type Description col
PDFNet.ColorPt -
setPadding(cr)
-
Parameters:
Name Type Description cr
PDFNet.Rect