Class PDAnnotationTextMarkup
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotation
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
-
- com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationTextMarkup
-
- All Implemented Interfaces:
COSObjectable
public class PDAnnotationTextMarkup extends PDAnnotationMarkup
This is the abstract class that represents a text markup annotation Introduced in PDF 1.3 specification, except Squiggly lines in 1.4.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSUB_TYPE_HIGHLIGHTThe types of annotation.static StringSUB_TYPE_SQUIGGLYThe types of annotation.static StringSUB_TYPE_STRIKEOUTThe types of annotation.static StringSUB_TYPE_UNDERLINEThe types of annotation.-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
RT_GROUP, RT_REPLY, SUB_TYPE_CARET, SUB_TYPE_FREETEXT, SUB_TYPE_INK, SUB_TYPE_POLYGON, SUB_TYPE_POLYLINE, SUB_TYPE_SOUND
-
-
Constructor Summary
Constructors Constructor Description PDAnnotationTextMarkup(COSDictionary field)Creates a TextMarkup annotation from a COSDictionary, expected to be a correct object definition.PDAnnotationTextMarkup(String subType)Creates a TextMarkup annotation of the specified sub type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]getQuadPoints()This will retrieve the set of quadpoints which encompass the areas of this annotation.StringgetSubtype()This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.voidsetQuadPoints(float[] quadPoints)This will set the set of quadpoints which encompass the areas of this annotation.voidsetSubtype(String subType)This will set the sub type (and hence appearance, AP taking precedence) For this annotation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotation
createAnnotation, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getPage, getRectangle, getStructParent, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setColor, setContents, setHidden, setInvisible, setLocked, setModifiedDate, setNoRotate, setNoView, setNoZoom, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setToggleNoView
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup
-
-
-
-
Field Detail
-
SUB_TYPE_HIGHLIGHT
public static final String SUB_TYPE_HIGHLIGHT
The types of annotation.- See Also:
- Constant Field Values
-
SUB_TYPE_UNDERLINE
public static final String SUB_TYPE_UNDERLINE
The types of annotation.- See Also:
- Constant Field Values
-
SUB_TYPE_SQUIGGLY
public static final String SUB_TYPE_SQUIGGLY
The types of annotation.- See Also:
- Constant Field Values
-
SUB_TYPE_STRIKEOUT
public static final String SUB_TYPE_STRIKEOUT
The types of annotation.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDAnnotationTextMarkup
public PDAnnotationTextMarkup(String subType)
Creates a TextMarkup annotation of the specified sub type.- Parameters:
subType- the subtype the annotation represents
-
PDAnnotationTextMarkup
public PDAnnotationTextMarkup(COSDictionary field)
Creates a TextMarkup annotation from a COSDictionary, expected to be a correct object definition.- Parameters:
field- the PDF objet to represent as a field.
-
-
Method Detail
-
setQuadPoints
public void setQuadPoints(float[] quadPoints)
This will set the set of quadpoints which encompass the areas of this annotation.- Parameters:
quadPoints- an array representing the set of area covered
-
getQuadPoints
public float[] getQuadPoints()
This will retrieve the set of quadpoints which encompass the areas of this annotation.- Returns:
- An array of floats representing the quad points.
-
setSubtype
public void setSubtype(String subType)
This will set the sub type (and hence appearance, AP taking precedence) For this annotation. See the SUB_TYPE_XXX constants for valid values.- Parameters:
subType- The subtype of the annotation
-
getSubtype
public String getSubtype()
This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.- Overrides:
getSubtypein classPDAnnotation- Returns:
- The subtype of this annotation, see the SUB_TYPE_XXX constants.
-
-