org.icepdf.core.pobjects.annotations
Class MarkupAnnotation

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.annotations.Annotation
          extended by org.icepdf.core.pobjects.annotations.MarkupAnnotation
Direct Known Subclasses:
CircleAnnotation, FreeTextAnnotation, InkAnnotation, LineAnnotation, SquareAnnotation, TextAnnotation, TextMarkupAnnotation

public abstract class MarkupAnnotation
extends Annotation

As mentioned in 12.5.2, “Annotation Dictionaries,� the meaning of an annotation’s Contents entry varies by annotation type. Typically, it is the text that shall be displayed for the annotation or, if the annotation does not display text, an alternate description of the annotation’s contents in human-readable form. In either case, the Contents entry is useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes (see 14.9.3, “Alternate Descriptions�).

Many annotation types are defined as markup annotations because they are used primarily to mark up PDF documents (see Table 170). These annotations have text that appears as part of the annotation and may be displayed in other ways by a conforming reader, such as in a Comments pane.

Markup annotations may be divided into the following groups:

Since:
5.0

Field Summary
static Name CA_KEY
          (Optional; PDF 1.4) The constant opacity value that shall be used in painting the annotation (see Sections 11.2, “Overview of Transparency,â€? and 11.3.7, “Shape and Opacity Computationsâ€?).
static Name CREATION_DATE_KEY
          (Optional; PDF 1.5) The date and time (7.9.4, “Datesâ€?) when the annotation was created.
protected  PDate creationDate
           
static Name EX_DATA_KEY
          (Optional; PDF 1.7) An external data dictionary specifying data that shall be associated with the annotation.
protected  MarkupAnnotation inReplyToAnnotation
           
protected  Name intent
           
static Name IRT_KEY
          (Required if an RT entry is present, otherwise optional; PDF 1.5) A reference to the annotation that this annotation is “in reply to.â€? Both annotations shall be on the same page of the document.
static Name IT_KEY
          (Optional; PDF 1.6) A name describing the intent of the markup annotation.
protected  float opacity
           
static Name POPUP_KEY
          (Optional; PDF 1.3) An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
protected  PopupAnnotation popupAnnotation
           
static Name RC_KEY
          (Optional; PDF 1.5) A rich text string (see 12.7.3.4, “Rich Text Stringsâ€?) that shall be displayed in the pop-up window when the annotation is opened.
protected  Name replyToRelation
           
protected  java.lang.String richText
           
static Name RT_KEY
          Optional; meaningful only if IRT is present; PDF 1.6) A name specifying the relationship (the “reply typeâ€?) between this annotation and one specified by IRT.
static Name SUBJ_KEY
          (Optional; PDF 1.5) Text representing a short description of the subject being addressed by the annotation.
protected  java.lang.String subject
           
static Name T_KEY
          Optional; PDF 1.1) The text label that shall be displayed in the title bar of the annotation’s pop-up window when open and active.
protected  java.lang.String titleText
           
 
Fields inherited from class org.icepdf.core.pobjects.annotations.Annotation
ACTION_KEY, APPEARANCE_STATE_KEY, APPEARANCE_STREAM_DOWN_KEY, APPEARANCE_STREAM_KEY, APPEARANCE_STREAM_NORMAL_KEY, APPEARANCE_STREAM_ROLLOVER_KEY, bbox, BBOX_VALUE, border, BORDER_DASH, BORDER_HORIZONTAL_CORNER_RADIUS, BORDER_KEY, BORDER_STYLE_KEY, BORDER_VERTICAL_CORNER_RADIUS, BORDER_WIDTH, borderStyle, canDrawBorder, color, COLOR_KEY, compressAppearanceStream, content, CONTENTS_KEY, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_KEY, FLAG_LOCKED, FLAG_LOCKED_CONTENTS, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINT, FLAG_READ_ONLY, FLAG_TOGGLE_NO_VIEW, hasBlendingMode, INVISIBLE_RECTANGLE, M_KEY, matrix, modifiedDate, NM_KEY, PARENT_KEY, PARENT_PAGE_KEY, RECTANGLE_KEY, RESOURCES_VALUE, securityManager, shapes, subtype, SUBTYPE_CIRCLE, SUBTYPE_FREE_TEXT, SUBTYPE_HIGHLIGHT, SUBTYPE_INK, SUBTYPE_LINE, SUBTYPE_LINK, SUBTYPE_POLYGON, SUBTYPE_POLYLINE, SUBTYPE_POPUP, SUBTYPE_SQUARE, SUBTYPE_TEXT, SUBTYPE_WIDGET, TYPE, TYPE_VALUE, userSpaceRectangle, VISIBLE_RECTANGLE
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
MarkupAnnotation(Library l, java.util.HashMap h)
           
 
Method Summary
 PDate getCreationDate()
           
 MarkupAnnotation getInReplyToAnnotation()
           
 Name getIntent()
           
 float getOpacity()
           
 PopupAnnotation getPopupAnnotation()
           
 Name getReplyToRelation()
           
 java.lang.String getRichText()
           
 java.lang.String getSubject()
           
 java.lang.String getTitleText()
           
 void init()
          Initiate the Dictionary.
 void setCreationDate(java.lang.String creationDate)
           
 void setInReplyToAnnotation(MarkupAnnotation inReplyToAnnotation)
           
 void setPopupAnnotation(PopupAnnotation popupAnnotation)
           
 void setRichText(java.lang.String richText)
           
 void setSubject(java.lang.String subject)
           
 void setTitleText(java.lang.String titleText)
           
 java.lang.String toString()
          Returns a summary of the dictionary entries.
 
Methods inherited from class org.icepdf.core.pobjects.annotations.Annotation
addAction, allowAlterProperties, allowPrintNormalMode, allowScreenDownMode, allowScreenNormalMode, allowScreenOrPrintRenderingOrInteraction, allowScreenRolloverMode, buildAnnotation, deleteAction, deriveDrawingRectangle, getAction, getAppearanceStream, getBbox, getBorder, getBorderStyle, getBorderStyleStroke, getBorderType, getColor, getContents, getFlagHidden, getFlagInvisible, getFlagLocked, getFlagLockedContents, getFlagNoRotate, getFlagNoView, getFlagNoZoom, getFlagPrint, getFlagReadOnly, getFlagToggleNoView, getLineStyle, getLineThickness, getPage, getParentAnnotation, getShapes, getSubType, getUserSpaceRectangle, hasAppearanceStream, isBorder, isSupportedAnnotationType, render, renderAppearanceStream, renderBorder, renderBorderTabSelected, resetAppearanceStream, resetAppearanceStream, setBBox, setBorderStyle, setColor, setCompressAppearanceStream, setContents, setFlag, setModifiedDate, setSubtype, setUserSpaceRectangle, syncBBoxToUserSpaceRectangle, updateAction
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

T_KEY

public static final Name T_KEY
Optional; PDF 1.1) The text label that shall be displayed in the title bar of the annotation’s pop-up window when open and active. This entry shall identify the user who added the annotation.


CA_KEY

public static final Name CA_KEY
(Optional; PDF 1.4) The constant opacity value that shall be used in painting the annotation (see Sections 11.2, “Overview of Transparency,� and 11.3.7, “Shape and Opacity Computations�). This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened.


RC_KEY

public static final Name RC_KEY
(Optional; PDF 1.5) A rich text string (see 12.7.3.4, “Rich Text Strings�) that shall be displayed in the pop-up window when the annotation is opened.


CREATION_DATE_KEY

public static final Name CREATION_DATE_KEY
(Optional; PDF 1.5) The date and time (7.9.4, “Dates�) when the annotation was created.


IRT_KEY

public static final Name IRT_KEY
(Required if an RT entry is present, otherwise optional; PDF 1.5) A reference to the annotation that this annotation is “in reply to.� Both annotations shall be on the same page of the document. The relationship between the two annotations shall be specified by the RT entry.

If this entry is present in an FDF file (see 12.7.7, “Forms Data Format�), its type shall not be a dictionary but a text string containing the contents of the NM entry of the annotation being replied to, to allow for a situation where the annotation being replied to is not in the same FDF file.


SUBJ_KEY

public static final Name SUBJ_KEY
(Optional; PDF 1.5) Text representing a short description of the subject being addressed by the annotation.


POPUP_KEY

public static final Name POPUP_KEY
(Optional; PDF 1.3) An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.


RT_KEY

public static final Name RT_KEY
Optional; meaningful only if IRT is present; PDF 1.6) A name specifying the relationship (the “reply type�) between this annotation and one specified by IRT. Valid values are:

R - The annotation shall be considered a reply to the annotation specified by IRT. Conforming readers shall not display replies to an annotation individually but together in the form of threaded comments.

Group - The annotation shall be grouped with the annotation specified by IRT; see the discussion following this Table.

Default value: R.


IT_KEY

public static final Name IT_KEY
(Optional; PDF 1.6) A name describing the intent of the markup annotation. Intents allow conforming readers to distinguish between different uses and behaviors of a single markup annotation type. If this entry is not present or its value is the same as the annotation type, the annotation shall have no explicit intent and should behave in a generic manner in a conforming reader.

Free text annotations (Table 174), line annotations (Table 175), polygon annotations (Table 178), and (PDF 1.7) polyline annotations (Table 178) have defined intents, whose values are enumerated in the corresponding tables.


EX_DATA_KEY

public static final Name EX_DATA_KEY
(Optional; PDF 1.7) An external data dictionary specifying data that shall be associated with the annotation. This dictionary contains the following entries:

Type - (optional) If present, shall be ExData.

Subtype - (required) a name specifying the type of data that the markup annotation shall be associated with. The only defined value is Markup3D. Table 298 lists the values that correspond to a subtype of Markup3D.


titleText

protected java.lang.String titleText

popupAnnotation

protected PopupAnnotation popupAnnotation

opacity

protected float opacity

richText

protected java.lang.String richText

creationDate

protected PDate creationDate

inReplyToAnnotation

protected MarkupAnnotation inReplyToAnnotation

subject

protected java.lang.String subject

replyToRelation

protected Name replyToRelation

intent

protected Name intent
Constructor Detail

MarkupAnnotation

public MarkupAnnotation(Library l,
                        java.util.HashMap h)
Method Detail

init

public void init()
Description copied from class: Dictionary
Initiate the Dictionary. Retrieve any needed attributes.

Overrides:
init in class Annotation

getTitleText

public java.lang.String getTitleText()

getPopupAnnotation

public PopupAnnotation getPopupAnnotation()

getOpacity

public float getOpacity()

getRichText

public java.lang.String getRichText()

getCreationDate

public PDate getCreationDate()

getInReplyToAnnotation

public MarkupAnnotation getInReplyToAnnotation()

getSubject

public java.lang.String getSubject()

getReplyToRelation

public Name getReplyToRelation()

getIntent

public Name getIntent()

setTitleText

public void setTitleText(java.lang.String titleText)

setPopupAnnotation

public void setPopupAnnotation(PopupAnnotation popupAnnotation)

setRichText

public void setRichText(java.lang.String richText)

setCreationDate

public void setCreationDate(java.lang.String creationDate)

setInReplyToAnnotation

public void setInReplyToAnnotation(MarkupAnnotation inReplyToAnnotation)

setSubject

public void setSubject(java.lang.String subject)

toString

public java.lang.String toString()
Description copied from class: Dictionary
Returns a summary of the dictionary entries.

Overrides:
toString in class Annotation
Returns:
dictionary values.