public class

Popup

extends Annot
java.lang.Object
   ↳ com.pdftron.pdf.Annot
     ↳ com.pdftron.pdf.annots.Popup

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class com.pdftron.pdf.Annot
Public Constructors
Popup(Obj d)
Creates a Popup annotation and initialize it using given Cos/SDF object.
Popup()
Creates an empty Popup annotation.
Popup(Annot annot)
Creates a Popup annotation and initialize it using given annotation object.
Public Methods
static Popup create(Doc doc, Rect pos)
Creates a new Popup annotation, in the specified document.
Annot getParent()
Get the Parent annotation of the Popup annotation.
boolean isOpen()
Get the initial openning condition of Popup.
void setOpen(boolean is_open)
Set the initial openning condition of Popup.
void setParent(Annot parent)
Set the Parent annotation of the Popup annotation.
[Expand]
Inherited Methods
From class com.pdftron.pdf.Annot
From class java.lang.Object

Public Constructors

public Popup (Obj d)

Creates a Popup annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
d the input Cos/SDF object

public Popup ()

Creates an empty Popup annotation.

public Popup (Annot annot)

Creates a Popup annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annot the annot

Public Methods

public static Popup create (Doc doc, Rect pos)

Creates a new Popup annotation, in the specified document.

Parameters
doc A document to which the Popup annotation is added.
pos A rectangle specifying the Popup annotation's bounds, specified in user space coordinates.
Returns
  • A newly created blank Popup annotation.

public Annot getParent ()

Get the Parent annotation of the Popup annotation.

Note: This annotation object represents the parent annotation with which this pop-up annotation shall be associated. If this entry is present, the parent annotation's Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

Returns
  • An annot object which is the parent annotation of the Popup annotation.

public boolean isOpen ()

Get the initial openning condition of Popup.

Note: This Open option is a flag specifying whether the pop-up annotation shall initially be displayed open. Default value: false (closed). If this entry is present, the parent annotation's Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

Returns
  • A bool indicating whether the Popup is initially open.

public void setOpen (boolean is_open)

Set the initial openning condition of Popup. (Optional)

Note: This Open option is a flag specifying whether the pop-up annotation shall initially be displayed open. Default value: false (closed). If this entry is present, the parent annotation's Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

Parameters
is_open A bool indicating whether the Popup is initially open.

public void setParent (Annot parent)

Set the Parent annotation of the Popup annotation. (Optional)

Note: This annotation object represents the parent annotation with which this pop-up annotation shall be associated. If this entry is present, the parent annotation's Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

Parameters
parent An annot object which is the parent annotation of the Popup annotation.