Class: PopupAnnot

PDFNet. PopupAnnot


new PopupAnnot()

A pop-up annotation (PDF 1.3) displays text in a pop-up window for entry and editing. It shall not appear alone but is associated with a markup annotation, its parent annotation, and shall be used for editing the parent's text. It shall have no appearance stream or associated actions of its own and shall be identified by the Popup entry in the parent's annotation dictionary.

Extends

  • Annot

Methods


<static> create(doc, pos)

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

<static> createFromAnnot(ann)

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

<static> createFromObj( [d])

creates a Popup 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.PopupAnnot"
Type
Promise.<PDFNet.PopupAnnot>

getParent()

Returns the parent annotation of the Popup annotation.
Returns:
A promise that resolves to an annot object which is the parent annotation of the Popup annotation.
Type
Promise.<PDFNet.Annot>

isOpen()

Returns the initial opening condition of Popup.
Returns:
A promise that resolves to a bool indicating whether the Popup is initially open.
Type
Promise.<boolean>

setOpen(isopen)

sets the initial opening condition of Popup. (Optional)
Parameters:
Name Type Description
isopen boolean A bool indicating whether the Popup is initially open.
Returns:
Type
Promise.<void>

setParent(parent)

sets the Parent annotation of the Popup annotation. (Optional)
Parameters:
Name Type Description
parent PDFNet.Annot An annot object which is the parent annotation of the Popup annotation.
Returns:
Type
Promise.<void>