Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.annotation

public Class PDAnnotationMarkup

extends PDAnnotation
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPolygon, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPolyline, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationRubberStamp, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationSound, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationText, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationTextMarkup, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationCaret, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationFileAttachment, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationFreeText, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationInk, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationLine
Imports
java.io.IOException, java.util.Calendar, org.apache.pdfbox.cos.COSBase, .COSDictionary, .COSName, .COSStream, .COSString

This class represents the additional fields of a Markup type Annotation. See section 12.5.6 of ISO32000-1:2008 (starting with page 390) for details on annotation types.
Author
Paul King

Field Summary

Modifier and TypeField and Description
public static final String
RT_GROUP

Constant for an annotation reply type.

public static final String
RT_REPLY

Constant for an annotation reply type.

Constructor Summary

AccessConstructor and Description
public
PDAnnotationMarkup()

Constructor.

public
PDAnnotationMarkup(COSDictionary
The annotations dictionary.
dict
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public PDBorderStyleDictionary

Returns:

the border style dictionary.
getBorderStyle
()

This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.

public float

Returns:

the constant opacity value.
getConstantOpacity
()

This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).

public Calendar

Returns:

the creation date/time.
getCreationDate
()

This will retrieve the date and time the annotation was created.

public PDExternalDataDictionary

Returns:

the external data dictionary
getExternalData
()

This will return the external data dictionary.

public PDAnnotation

Returns:

the other annotation or null if there is none.
getInReplyTo
()

This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

public String

Returns:

the intent
getIntent
()

This will retrieve the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

public PDAnnotationPopup

Returns:

the popup annotation.
getPopup
()

This will retrieve the popup annotation used for entering/editing the text for this annotation.

public String

Returns:

the relationship.
getReplyType
()

This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

public String

Returns:

the rich text stream.
getRichContents
()

This will retrieve the rich text stream which is displayed in the popup window.

public String

Returns:

the subject.
getSubject
()

This will retrieve the short description of the subject of the annotation.

public String

Returns:

The title of the popup.
getTitlePopup
()

Retrieve the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

public void
setBorderStyle(PDBorderStyleDictionary
the border style dictionary to set.
bs
)

This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.

public void
setConstantOpacity(float
the constant opacity value.
ca
)

This will set the constant opacity value used when rendering the annotation (excluing any popup).

public void
setCreationDate(Calendar
the date and time the annotation was created.
creationDate
)

This will set the date and time the annotation was created.

public void
setExternalData(PDExternalDataDictionary
the external data dictionary
externalData
)

This will set the external data dictionary.

public void
setInReplyTo(PDAnnotation
the annotation this one is "In Reply To".
irt
)

This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

public void
setIntent(String
the intent
it
)

This will set the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

public void
setPopup(PDAnnotationPopup
the popup annotation.
popup
)

This will set the popup annotation used for entering/editing the text for this annotation.

public void
setReplyType(String
the reply type.
rt
)

This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

public void
setRichContents(String
the rich text stream.
rc
)

This will set the rich text stream which is displayed in the popup window.

public void
setSubject(String
short description of the subject.
subj
)

This will set the short description of the subject of the annotation.

public void
setTitlePopup(String
The title of the popup.
t
)

Set the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

Inherited from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation:
constructAppearancesconstructAppearancescreateAnnotationequalsgetAnnotationFlagsgetAnnotationNamegetAppearancegetAppearanceStategetBordergetColorgetColorgetContentsgetCOSObjectgetModifiedDategetNormalAppearanceStreamgetOptionalContentgetPagegetRectanglegetStructParentgetSubtypehashCodeisHiddenisInvisibleisLockedisLockedContentsisNoRotateisNoViewisNoZoomisPrintedisReadOnlyisToggleNoViewsetAnnotationFlagssetAnnotationNamesetAppearancesetAppearanceStatesetBordersetColorsetContentssetHiddensetInvisiblesetLockedsetLockedContentssetModifiedDatesetModifiedDatesetNoRotatesetNoViewsetNoZoomsetOptionalContentsetPagesetPrintedsetReadOnlysetRectanglesetStructParentsetSubtypesetToggleNoView

Field Detail

RT_GROUPback to summary
public static final String RT_GROUP

Constant for an annotation reply type.

RT_REPLYback to summary
public static final String RT_REPLY

Constant for an annotation reply type.

Constructor Detail

PDAnnotationMarkupback to summary
public PDAnnotationMarkup()

Constructor.

PDAnnotationMarkupback to summary
public PDAnnotationMarkup(COSDictionary dict)

Constructor.

Parameters
dict:COSDictionary

The annotations dictionary.

Method Detail

getBorderStyleback to summary
public PDBorderStyleDictionary getBorderStyle()

This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.

Returns:PDBorderStyleDictionary

the border style dictionary.

getConstantOpacityback to summary
public float getConstantOpacity()

This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).

Returns:float

the constant opacity value.

getCreationDateback to summary
public Calendar getCreationDate()

This will retrieve the date and time the annotation was created.

Returns:Calendar

the creation date/time.

getExternalDataback to summary
public PDExternalDataDictionary getExternalData()

This will return the external data dictionary.

Returns:PDExternalDataDictionary

the external data dictionary

getInReplyToback to summary
public PDAnnotation getInReplyTo() throws IOException

This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

Returns:PDAnnotation

the other annotation or null if there is none.

Exceptions
IOException:
if there is an error creating the other annotation.
getIntentback to summary
public String getIntent()

This will retrieve the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

Returns:String

the intent

getPopupback to summary
public PDAnnotationPopup getPopup()

This will retrieve the popup annotation used for entering/editing the text for this annotation.

Returns:PDAnnotationPopup

the popup annotation.

getReplyTypeback to summary
public String getReplyType()

This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

Returns:String

the relationship.

getRichContentsback to summary
public String getRichContents()

This will retrieve the rich text stream which is displayed in the popup window.

Returns:String

the rich text stream.

getSubjectback to summary
public String getSubject()

This will retrieve the short description of the subject of the annotation.

Returns:String

the subject.

getTitlePopupback to summary
public String getTitlePopup()

Retrieve the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

Returns:String

The title of the popup.

setBorderStyleback to summary
public void setBorderStyle(PDBorderStyleDictionary bs)

This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.

Parameters
bs:PDBorderStyleDictionary

the border style dictionary to set.

setConstantOpacityback to summary
public void setConstantOpacity(float ca)

This will set the constant opacity value used when rendering the annotation (excluing any popup).

Parameters
ca:float

the constant opacity value.

setCreationDateback to summary
public void setCreationDate(Calendar creationDate)

This will set the date and time the annotation was created.

Parameters
creationDate:Calendar

the date and time the annotation was created.

setExternalDataback to summary
public void setExternalData(PDExternalDataDictionary externalData)

This will set the external data dictionary.

Parameters
externalData:PDExternalDataDictionary

the external data dictionary

setInReplyToback to summary
public void setInReplyTo(PDAnnotation irt)

This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

Parameters
irt:PDAnnotation

the annotation this one is "In Reply To".

setIntentback to summary
public void setIntent(String it)

This will set the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

Parameters
it:String

the intent

setPopupback to summary
public void setPopup(PDAnnotationPopup popup)

This will set the popup annotation used for entering/editing the text for this annotation.

Parameters
popup:PDAnnotationPopup

the popup annotation.

setReplyTypeback to summary
public void setReplyType(String rt)

This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

Parameters
rt:String

the reply type.

setRichContentsback to summary
public void setRichContents(String rc)

This will set the rich text stream which is displayed in the popup window.

Parameters
rc:String

the rich text stream.

setSubjectback to summary
public void setSubject(String subj)

This will set the short description of the subject of the annotation.

Parameters
subj:String

short description of the subject.

setTitlePopupback to summary
public void setTitlePopup(String t)

Set the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

Parameters
t:String

The title of the popup.