Package com.itextpdf.kernel.pdf.annot
Class PdfTextAnnotation
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.annot.PdfAnnotation
-
- com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
-
- com.itextpdf.kernel.pdf.annot.PdfTextAnnotation
-
public class PdfTextAnnotation extends PdfMarkupAnnotation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
PdfAnnotation.PdfUnknownAnnotation
-
-
Field Summary
-
Fields inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
inReplyTo, popup
-
Fields inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
Accepted, Canceled, Completed, HIDDEN, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, None, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked
-
-
Constructor Summary
Constructors Modifier Constructor Description PdfTextAnnotation(Rectangle rect)protectedPdfTextAnnotation(PdfDictionary pdfObject)Instantiates a newPdfTextAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfNamegetIconName()The name of an icon that is used in displaying the annotation.booleangetOpen()A flag specifying whether the annotation shall initially be displayed open.PdfStringgetState()PdfStringgetStateModel()PdfNamegetSubtype()Gets aPdfNamewhich value is a subtype of this annotation.PdfTextAnnotationsetIconName(PdfName name)The name of an icon that is used in displaying the annotation.PdfTextAnnotationsetOpen(boolean open)Sets a flag specifying whether the annotation shall initially be displayed open.PdfTextAnnotationsetState(PdfString state)PdfTextAnnotationsetStateModel(PdfString stateModel)-
Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
getCreationDate, getExternalData, getInReplyTo, getInReplyToObject, getIntent, getOpacity, getPopup, getPopupObject, getReplyType, getRichText, getSubject, getText, setCreationDate, setExternalData, setInReplyTo, setIntent, setOpacity, setPopup, setReplyType, setRichText, setSubject, setText
-
Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
addAssociatedFile, flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getAssociatedFiles, getBlendMode, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getLang, getName, getNonStrokingOpacity, getNormalAppearanceObject, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStrokingOpacity, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBlendMode, setBorder, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLang, setLayer, setName, setNonStrokingOpacity, setNormalAppearance, setNormalAppearance, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStrokingOpacity, setStructParentIndex, setTitle
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
PdfTextAnnotation
public PdfTextAnnotation(Rectangle rect)
-
PdfTextAnnotation
protected PdfTextAnnotation(PdfDictionary pdfObject)
Instantiates a newPdfTextAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document.- Parameters:
pdfObject- thePdfDictionaryrepresenting annotation object- See Also:
PdfAnnotation.makeAnnotation(PdfObject)
-
-
Method Detail
-
getSubtype
public PdfName getSubtype()
Description copied from class:PdfAnnotationGets aPdfNamewhich value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
getSubtypein classPdfAnnotation- Returns:
- subtype of this annotation.
-
getState
public PdfString getState()
-
setState
public PdfTextAnnotation setState(PdfString state)
-
getStateModel
public PdfString getStateModel()
-
setStateModel
public PdfTextAnnotation setStateModel(PdfString stateModel)
-
getOpen
public boolean getOpen()
A flag specifying whether the annotation shall initially be displayed open. This flag has affect to not all kinds of annotations.- Returns:
- true if annotation is initially open, false - if closed.
-
setOpen
public PdfTextAnnotation setOpen(boolean open)
Sets a flag specifying whether the annotation shall initially be displayed open. This flag has affect to not all kinds of annotations.- Parameters:
open- true if annotation shall initially be open, false - if closed.- Returns:
- this
PdfTextAnnotationinstance.
-
getIconName
public PdfName getIconName()
The name of an icon that is used in displaying the annotation. Possible values are described insetIconName(PdfName).- Returns:
- a
PdfNamethat specifies the icon for displaying annotation, or null if icon name is not specified.
-
setIconName
public PdfTextAnnotation setIconName(PdfName name)
The name of an icon that is used in displaying the annotation.- Parameters:
name- aPdfNamethat specifies the icon for displaying annotation. Possible values are:- Comment
- Key
- Note
- Help
- NewParagraph
- Paragraph
- Insert
- Returns:
- this
PdfTextAnnotationinstance.
-
-