public class PDAnnotationText extends PDAnnotationMarkup
Modifier and Type | Field and Description |
---|---|
static String |
NAME_CHECK
Constant for the name of a check annotation.
|
static String |
NAME_CIRCLE
Constant for the name of a circle annotation.
|
static String |
NAME_COMMENT
Constant for the name of a text annotation.
|
static String |
NAME_CROSS
Constant for the name of a cross annotation.
|
static String |
NAME_CROSS_HAIRS
Constant for the name of a crosshairs annotation.
|
static String |
NAME_HELP
Constant for the name of a text annotation.
|
static String |
NAME_INSERT
Constant for the name of a text annotation.
|
static String |
NAME_KEY
Constant for the name of a text annotation.
|
static String |
NAME_NEW_PARAGRAPH
Constant for the name of a text annotation.
|
static String |
NAME_NOTE
Constant for the name of a text annotation.
|
static String |
NAME_PARAGRAPH
Constant for the name of a text annotation.
|
static String |
NAME_RIGHT_ARROW
Constant for the name of a right arrow annotation.
|
static String |
NAME_RIGHT_POINTER
Constant for the name of a right pointer annotation.
|
static String |
NAME_STAR
Constant for the name of a star annotation.
|
static String |
NAME_UP_ARROW
Constant for the name of a crosshairs annotation.
|
static String |
NAME_UP_LEFT_ARROW
Constant for the name of a crosshairs annotation.
|
static String |
SUB_TYPE
The type of annotation.
|
RT_GROUP, RT_REPLY
Constructor and Description |
---|
PDAnnotationText()
Constructor.
|
PDAnnotationText(COSDictionary field)
Creates a Text annotation from a COSDictionary, expected to be a correct object definition.
|
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.
|
String |
getName()
This will retrieve the name (and hence appearance, AP taking precedence) For this annotation.
|
boolean |
getOpen()
This will retrieve the initial state of the annotation, open Or closed (default closed).
|
String |
getState()
This will retrieve the annotation state.
|
String |
getStateModel()
This will retrieve the annotation state model.
|
void |
setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)
Set a custom appearance handler for generating the annotations appearance streams.
|
void |
setName(String name)
This will set the name (and hence appearance, AP taking precedence) For this annotation.
|
void |
setOpen(boolean open)
This will set initial state of the annotation, open or closed.
|
void |
setState(String state)
This will set the annotation state.
|
void |
setStateModel(String stateModel)
This will set the annotation state model.
|
getBorderStyle, getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setBorderStyle, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup
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
public static final String NAME_COMMENT
public static final String NAME_KEY
public static final String NAME_NOTE
public static final String NAME_HELP
public static final String NAME_NEW_PARAGRAPH
public static final String NAME_PARAGRAPH
public static final String NAME_INSERT
public static final String NAME_CIRCLE
public static final String NAME_CROSS
public static final String NAME_STAR
public static final String NAME_CHECK
public static final String NAME_RIGHT_ARROW
public static final String NAME_RIGHT_POINTER
public static final String NAME_UP_ARROW
public static final String NAME_UP_LEFT_ARROW
public static final String NAME_CROSS_HAIRS
public static final String SUB_TYPE
public PDAnnotationText()
public PDAnnotationText(COSDictionary field)
field
- the PDF object to represent as a field.public void setOpen(boolean open)
open
- Boolean value, true = open false = closedpublic boolean getOpen()
public void setName(String name)
name
- The name of the annotationpublic String getName()
public String getState()
public void setState(String state)
state
- the annotation statepublic String getStateModel()
public void setStateModel(String stateModel)
stateModel
- the annotation state modelpublic void setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)
appearanceHandler
- custom appearance handlerpublic void constructAppearances()
PDAnnotation
constructAppearances
in class PDAnnotation
public void constructAppearances(PDDocument document)
PDAnnotation
constructAppearances
in class PDAnnotation
document
- the related documentCopyright © 2002–2023 The Apache Software Foundation. All rights reserved.