public class PDAnnotationMarkup extends PDAnnotation
Modifier and Type | Field and Description |
---|---|
static String |
IT_FREE_TEXT
A plain free-text annotation, also known as a text box comment.
|
static String |
IT_FREE_TEXT_CALLOUT
A callout, associated with an area on the page through the callout line specified.
|
static String |
IT_FREE_TEXT_TYPE_WRITER
The annotation is intended to function as a click-to-type or typewriter object.
|
static String |
RT_GROUP
Constant for an annotation reply type.
|
static String |
RT_REPLY
Constant for an annotation reply type.
|
static String |
SUB_TYPE_CARET
Constant for an Caret type of annotation.
|
static String |
SUB_TYPE_FREETEXT
Constant for a FreeText type of annotation.
|
static String |
SUB_TYPE_INK
Constant for an Ink type of annotation.
|
static String |
SUB_TYPE_POLYGON
Constant for an Polygon type of annotation.
|
static String |
SUB_TYPE_POLYLINE
Constant for an PolyLine type of annotation.
|
static String |
SUB_TYPE_SOUND
Constant for an Sound type of annotation.
|
Constructor and Description |
---|
PDAnnotationMarkup()
Constructor.
|
PDAnnotationMarkup(COSDictionary dict)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
constructAppearances()
Create the appearance entry for this annotation.
|
void |
constructAppearances(PDDocument document)
Create the appearance entry for this annotation.
|
PDBorderEffectDictionary |
getBorderEffect()
This will retrieve the border effect dictionary, specifying effects to be applied used in
drawing the line.
|
PDBorderStyleDictionary |
getBorderStyle()
This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.
|
float[] |
getCallout()
This will get the coordinates of the callout line.
|
float |
getConstantOpacity()
This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).
|
Calendar |
getCreationDate()
This will retrieve the date and time the annotation was created.
|
String |
getDefaultAppearance()
Get the default appearance.
|
String |
getDefaultStyleString()
Get the default style string.
|
String |
getEndPointEndingStyle()
This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.
|
PDExternalDataDictionary |
getExternalData()
This will return the external data dictionary.
|
float[][] |
getInkList()
Get one or more disjoint paths that make this annotation.
|
PDAnnotation |
getInReplyTo()
This will retrieve the annotation to which this one is "In Reply To" the actual relationship
is specified by the RT entry.
|
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.
|
PDColor |
getInteriorColor()
This will retrieve the interior color.
|
String |
getLineEndingStyle()
This will retrieve the line ending style.
|
float[][] |
getPath()
PDF 2.0: This will retrieve the arrays that shall represent the alternating horizontal
and vertical coordinates for path building.
|
PDAnnotationPopup |
getPopup()
This will retrieve the popup annotation used for entering/editing the text for this annotation.
|
int |
getQ()
This will get the 'quadding' or justification of the text to be displayed.
|
PDRectangle |
getRectDifference()
This will get the rectangle difference rectangle.
|
float[] |
getRectDifferences()
This will get the margin between the annotations "outer" rectangle defined by
/Rect and the boundaries of the underlying caret.
|
String |
getReplyType()
This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for
the available values.
|
String |
getRichContents()
This will retrieve the rich text stream which is displayed in the popup window.
|
String |
getStartPointEndingStyle()
This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.
|
String |
getSubject()
This will retrieve the short description of the subject of the annotation.
|
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).
|
float[] |
getVertices()
This will retrieve the numbers that shall represent the alternating horizontal and vertical
coordinates.
|
void |
setBorderEffect(PDBorderEffectDictionary be)
This will set the border effect dictionary, specifying effects to be applied when drawing the
line.
|
void |
setBorderStyle(PDBorderStyleDictionary bs)
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.
|
void |
setCallout(float[] callout)
This will set the coordinates of the callout line.
|
void |
setConstantOpacity(float ca)
This will set the constant opacity value used when rendering the annotation (excluing any popup).
|
void |
setCreationDate(Calendar creationDate)
This will set the date and time the annotation was created.
|
void |
setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)
Set a custom appearance handler for generating the annotations appearance streams.
|
void |
setDefaultAppearance(String daValue)
Set the default appearance.
|
void |
setDefaultStyleString(String defaultStyleString)
Set the default style string.
|
void |
setEndPointEndingStyle(String style)
This will set the line ending style for the end point, see the LE_ constants for the possible values.
|
void |
setExternalData(PDExternalDataDictionary externalData)
This will set the external data dictionary.
|
void |
setInkList(float[][] inkList)
Sets the paths that make this annotation.
|
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.
|
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.
|
void |
setInteriorColor(PDColor ic)
This will set interior color.
|
void |
setLineEndingStyle(String style)
This will set the line ending style.
|
void |
setPopup(PDAnnotationPopup popup)
This will set the popup annotation used for entering/editing the text for this annotation.
|
void |
setQ(int q)
This will set the quadding/justification of the text.
|
void |
setRectDifference(PDRectangle rd)
This will set the rectangle difference rectangle.
|
void |
setRectDifferences(float difference)
This will set the difference between the annotations "outer" rectangle defined by
/Rect and boundaries of the underlying.
|
void |
setRectDifferences(float differenceLeft,
float differenceTop,
float differenceRight,
float differenceBottom)
This will set the difference between the annotations "outer" rectangle defined by
/Rect and the border.
|
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.
|
void |
setRichContents(String rc)
This will set the rich text stream which is displayed in the popup window.
|
void |
setStartPointEndingStyle(String style)
This will set the line ending style for the start point, see the LE_ constants for the possible values.
|
void |
setSubject(String subj)
This will set the short description of the subject of the annotation.
|
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).
|
void |
setVertices(float[] points)
This will set the numbers that shall represent the alternating horizontal and vertical
coordinates.
|
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, setToggleNoView
public static final String SUB_TYPE_FREETEXT
public static final String SUB_TYPE_POLYGON
public static final String SUB_TYPE_POLYLINE
public static final String SUB_TYPE_CARET
public static final String SUB_TYPE_INK
public static final String SUB_TYPE_SOUND
public static final String IT_FREE_TEXT
public static final String IT_FREE_TEXT_CALLOUT
public static final String IT_FREE_TEXT_TYPE_WRITER
public static final String RT_REPLY
public static final String RT_GROUP
public PDAnnotationMarkup()
public PDAnnotationMarkup(COSDictionary dict)
dict
- The annotations dictionary.public String getTitlePopup()
public void setTitlePopup(String t)
t
- The title of the popup.public PDAnnotationPopup getPopup()
public void setPopup(PDAnnotationPopup popup)
popup
- the popup annotation.public float getConstantOpacity()
public void setConstantOpacity(float ca)
ca
- the constant opacity value.public String getRichContents()
public void setRichContents(String rc)
rc
- the rich text stream.public Calendar getCreationDate() throws IOException
IOException
- if there is a format problem when converting the date.public void setCreationDate(Calendar creationDate)
creationDate
- the date and time the annotation was created.public PDAnnotation getInReplyTo() throws IOException
IOException
- if there is an error creating the other annotation.public void setInReplyTo(PDAnnotation irt)
irt
- the annotation this one is "In Reply To".public String getSubject()
public void setSubject(String subj)
subj
- short description of the subject.public String getReplyType()
public void setReplyType(String rt)
rt
- the reply type.public String getIntent()
public void setIntent(String it)
it
- the intentpublic PDExternalDataDictionary getExternalData()
public void setExternalData(PDExternalDataDictionary externalData)
externalData
- the external data dictionarypublic void setBorderStyle(PDBorderStyleDictionary bs)
bs
- the border style dictionary to set.public PDBorderStyleDictionary getBorderStyle()
public final void setLineEndingStyle(String style)
style
- The new style.public String getLineEndingStyle()
public void setInteriorColor(PDColor ic)
ic
- color.public PDColor getInteriorColor()
public void setBorderEffect(PDBorderEffectDictionary be)
be
- The border effect dictionary to set.public PDBorderEffectDictionary getBorderEffect()
public void setInkList(float[][] inkList)
inkList
- An array of arrays, each representing a stroked path. Each array shall be a
series of alternating horizontal and vertical coordinates. If the parameter is null the entry
will be removed.public float[][] getInkList()
public String getDefaultAppearance()
public void setDefaultAppearance(String daValue)
daValue
- a string describing the default appearance.public String getDefaultStyleString()
public void setDefaultStyleString(String defaultStyleString)
defaultStyleString
- a string describing the default style.public int getQ()
PDVariableText
.public void setQ(int q)
PDVariableText
.q
- The new text justification.public void setRectDifference(PDRectangle rd)
rd
- the rectangle differencepublic PDRectangle getRectDifference()
public void setRectDifferences(float difference)
This will set an equal difference for all sides
difference
- from the annotations /Rect entrypublic void setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)
differenceLeft
- left difference from the annotations /Rect entrydifferenceTop
- top difference from the annotations /Rect entrydifferenceRight
- right difference from the annotations /Rect entrydifferenceBottom
- bottom difference from the annotations /Rect entrypublic float[] getRectDifferences()
public final void setCallout(float[] callout)
callout
- An array of four or six numbers specifying a callout line attached to the free
text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and
ending coordinates of the line in default user space, four numbers [ x1 y1 x2 y2 ] represent
the starting and ending coordinates of the line.public float[] getCallout()
public void setStartPointEndingStyle(String style)
style
- The new style.public String getStartPointEndingStyle()
public void setEndPointEndingStyle(String style)
style
- The new style.public String getEndPointEndingStyle()
public float[] getVertices()
public void setVertices(float[] points)
points
- an array with the numbers that shall represent the alternating horizontal and
vertical coordinates.public float[][] getPath()
public void setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)
appearanceHandler
- public void constructAppearances()
PDAnnotation
constructAppearances
in class PDAnnotation
public void constructAppearances(PDDocument document)
PDAnnotation
constructAppearances
in class PDAnnotation
Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.