Class PDAnnotationMarkup
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDAnnotationCaret,PDAnnotationFileAttachment,PDAnnotationFreeText,PDAnnotationInk,PDAnnotationLine,PDAnnotationPolygon,PDAnnotationPolyline,PDAnnotationRubberStamp,PDAnnotationSound,PDAnnotationSquareCircle,PDAnnotationText,PDAnnotationTextMarkup
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThis will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.floatThis will retrieve the constant opacity value used when rendering the annotation (excluing any popup).This will retrieve the date and time the annotation was created.This will return the external data dictionary.This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.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.getPopup()This will retrieve the popup annotation used for entering/editing the text for this annotation.This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.This will retrieve the rich text stream which is displayed in the popup window.This will retrieve the short description of the subject of the annotation.Retrieve the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).voidThis will set the border style dictionary, specifying the width and dash pattern used in drawing the line.voidsetConstantOpacity(float ca) This will set the constant opacity value used when rendering the annotation (excluing any popup).voidsetCreationDate(Calendar creationDate) This will set the date and time the annotation was created.voidsetExternalData(PDExternalDataDictionary externalData) This will set the external data dictionary.voidsetInReplyTo(PDAnnotation irt) This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.voidThis 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.voidsetPopup(PDAnnotationPopup popup) This will set the popup annotation used for entering/editing the text for this annotation.voidsetReplyType(String rt) This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.voidThis will set the rich text stream which is displayed in the popup window.voidsetSubject(String subj) This will set the short description of the subject of the annotation.voidSet the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
constructAppearances, constructAppearances, createAnnotation, equals, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, getSubtype, hashCode, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setBorder, setColor, setContents, setHidden, setInvisible, setLocked, setLockedContents, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setOptionalContent, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setSubtype, setToggleNoView
-
Field Details
-
RT_REPLY
Constant for an annotation reply type.- See Also:
-
RT_GROUP
Constant for an annotation reply type.- See Also:
-
-
Constructor Details
-
PDAnnotationMarkup
public PDAnnotationMarkup()Constructor. -
PDAnnotationMarkup
Constructor.- Parameters:
dict- The annotations dictionary.
-
-
Method Details
-
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:
- The title of the popup.
-
setTitlePopup
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- The title of the popup.
-
getPopup
This will retrieve the popup annotation used for entering/editing the text for this annotation.- Returns:
- the popup annotation.
-
setPopup
This will set the popup annotation used for entering/editing the text for this annotation.- Parameters:
popup- the popup annotation.
-
getConstantOpacity
public float getConstantOpacity()This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).- Returns:
- the constant opacity value.
-
setConstantOpacity
public void setConstantOpacity(float ca) This will set the constant opacity value used when rendering the annotation (excluing any popup).- Parameters:
ca- the constant opacity value.
-
getRichContents
This will retrieve the rich text stream which is displayed in the popup window.- Returns:
- the rich text stream.
-
setRichContents
This will set the rich text stream which is displayed in the popup window.- Parameters:
rc- the rich text stream.
-
getCreationDate
This will retrieve the date and time the annotation was created.- Returns:
- the creation date/time.
-
setCreationDate
This will set the date and time the annotation was created.- Parameters:
creationDate- the date and time the annotation was created.
-
getInReplyTo
This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.- Returns:
- the other annotation or null if there is none.
- Throws:
IOException- if there is an error creating the other annotation.
-
setInReplyTo
This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.- Parameters:
irt- the annotation this one is "In Reply To".
-
getSubject
This will retrieve the short description of the subject of the annotation.- Returns:
- the subject.
-
setSubject
This will set the short description of the subject of the annotation.- Parameters:
subj- short description of the subject.
-
getReplyType
This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.- Returns:
- the relationship.
-
setReplyType
This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.- Parameters:
rt- the reply type.
-
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:
- the intent
-
setIntent
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- the intent
-
getExternalData
This will return the external data dictionary.- Returns:
- the external data dictionary
-
setExternalData
This will set the external data dictionary.- Parameters:
externalData- the external data dictionary
-
setBorderStyle
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.- Parameters:
bs- the border style dictionary to set.
-
getBorderStyle
This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.- Returns:
- the border style dictionary.
-