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.
Extends
- MarkupAnnot
Methods
-
<static> create(doc, pos)
-
Creates a new Square annotation in the specified document.
Parameters:
Name Type Description doc
PDFNet.PDFDoc | PDFNet.SDFDoc | PDFNet.FDFDoc 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
- Promise.<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: "PDFNet.SquareAnnot"- Type
- Promise.<PDFNet.SquareAnnot>
-
<static> createFromObj( [d])
-
creates an Square 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.SquareAnnot"- Type
- Promise.<PDFNet.SquareAnnot>
-
getContentRect()
-
Returns:
A promise that resolves to an object of type: "PDFNet.Rect"- Type
- Promise.<PDFNet.Rect>
-
getInteriorColor()
-
Returns:
A promise that resolves to an object of type: "PDFNet.ColorPt"- Type
- Promise.<PDFNet.ColorPt>
-
getInteriorColorCompNum()
-
Returns:
A promise that resolves to an object of type: "number"- Type
- Promise.<number>
-
getPadding()
-
Returns:
A promise that resolves to an object of type: "PDFNet.Rect"- Type
- Promise.<PDFNet.Rect>
-
setContentRect(cr)
-
Parameters:
Name Type Description cr
PDFNet.Rect Returns:
- Type
- Promise.<void>
-
setInteriorColor(col, numcomp)
-
Parameters:
Name Type Description col
PDFNet.ColorPt numcomp
number Returns:
- Type
- Promise.<void>
-
setInteriorColorDefault(col)
-
Parameters:
Name Type Description col
PDFNet.ColorPt Returns:
- Type
- Promise.<void>
-
setPadding(cr)
-
Parameters:
Name Type Description cr
PDFNet.Rect Returns:
- Type
- Promise.<void>