Class PDAnnotationTextMarkup
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationTextMarkup
- All Implemented Interfaces:
COSObjectable
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
FieldsModifier and TypeFieldDescriptionprivate PDAppearanceHandler
static final String
The types of annotation.static final String
The types of annotation.static final String
The types of annotation.static final String
The types of annotation.Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
IT_FREE_TEXT, IT_FREE_TEXT_CALLOUT, IT_FREE_TEXT_TYPE_WRITER, RT_GROUP, RT_REPLY, SUB_TYPE_CARET, SUB_TYPE_FREETEXT, SUB_TYPE_INK, SUB_TYPE_POLYGON, SUB_TYPE_POLYLINE, SUB_TYPE_SOUND
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PDAnnotationTextMarkup
(String subType) Creates a TextMarkup annotation of the specified sub type.Creates a TextMarkup annotation from a COSDictionary, expected to be a correct object definition. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Create the appearance entry for this annotation.void
constructAppearances
(PDDocument document) Create the appearance entry for this annotation.float[]
This will retrieve the set of quadpoints which encompass the areas of this annotation.This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.void
setCustomAppearanceHandler
(PDAppearanceHandler appearanceHandler) Set a custom appearance handler for generating the annotations appearance streams.void
setQuadPoints
(float[] quadPoints) This will set the set of quadpoints which encompass the areas of this annotation.void
setSubtype
(String subType) This will set the sub type (and hence appearance, AP taking precedence) For this annotation.Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
getBorderEffect, getBorderStyle, getCallout, getConstantOpacity, getCreationDate, getDefaultAppearance, getDefaultStyleString, getEndPointEndingStyle, getExternalData, getInkList, getInReplyTo, getIntent, getInteriorColor, getLineEndingStyle, getPath, getPopup, getQ, getRectDifference, getRectDifferences, getReplyType, getRichContents, getStartPointEndingStyle, getSubject, getTitlePopup, getVertices, setBorderEffect, setBorderStyle, setCallout, setConstantOpacity, setCreationDate, setDefaultAppearance, setDefaultStyleString, setEndPointEndingStyle, setExternalData, setInkList, setInReplyTo, setIntent, setInteriorColor, setLineEndingStyle, setPopup, setQ, setRectDifference, setRectDifferences, setRectDifferences, setReplyType, setRichContents, setStartPointEndingStyle, setSubject, setTitlePopup, setVertices
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
createAnnotation, equals, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, 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
-
Field Details
-
customAppearanceHandler
-
SUB_TYPE_HIGHLIGHT
The types of annotation.- See Also:
-
SUB_TYPE_UNDERLINE
The types of annotation.- See Also:
-
SUB_TYPE_SQUIGGLY
The types of annotation.- See Also:
-
SUB_TYPE_STRIKEOUT
The types of annotation.- See Also:
-
-
Constructor Details
-
PDAnnotationTextMarkup
private PDAnnotationTextMarkup() -
PDAnnotationTextMarkup
Creates a TextMarkup annotation of the specified sub type.- Parameters:
subType
- the subtype the annotation represents
-
PDAnnotationTextMarkup
Creates a TextMarkup annotation from a COSDictionary, expected to be a correct object definition.- Parameters:
field
- the PDF object to represent as a field.
-
-
Method Details
-
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
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
This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.- Overrides:
getSubtype
in classPDAnnotation
- Returns:
- The subtype of this annotation, see the SUB_TYPE_XXX constants.
-
setCustomAppearanceHandler
Set a custom appearance handler for generating the annotations appearance streams.- Overrides:
setCustomAppearanceHandler
in classPDAnnotationMarkup
- Parameters:
appearanceHandler
-
-
constructAppearances
public void constructAppearances()Description copied from class:PDAnnotation
Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.- Overrides:
constructAppearances
in classPDAnnotationMarkup
-
constructAppearances
Description copied from class:PDAnnotation
Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.- Overrides:
constructAppearances
in classPDAnnotationMarkup
-