Package com.itextpdf.kernel.pdf.annot
Class PdfInkAnnotation
- 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.PdfInkAnnotation
-
public class PdfInkAnnotation 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 PdfInkAnnotation(Rectangle rect)
PdfInkAnnotation(Rectangle rect, PdfArray inkList)
protected
PdfInkAnnotation(PdfDictionary pdfObject)
Instantiates a newPdfInkAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfDictionary
getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.PdfName
getSubtype()
Gets aPdfName
which value is a subtype of this annotation.PdfInkAnnotation
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()
).PdfInkAnnotation
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.PdfInkAnnotation
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.-
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
-
PdfInkAnnotation
public PdfInkAnnotation(Rectangle rect)
-
PdfInkAnnotation
protected PdfInkAnnotation(PdfDictionary pdfObject)
Instantiates a newPdfInkAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.- Parameters:
pdfObject
- thePdfDictionary
representing annotation object- See Also:
PdfAnnotation.makeAnnotation(PdfObject)
-
-
Method Detail
-
getSubtype
public PdfName getSubtype()
Description copied from class:PdfAnnotation
Gets aPdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
getSubtype
in classPdfAnnotation
- Returns:
- subtype of this annotation.
-
getBorderStyle
public PdfDictionary getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry. That entry specifies a border style dictionary that has more settings than the array specified for the Border entry (seePdfAnnotation.getBorder()
). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (seePdfAnnotation.getAppearanceDictionary()
) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.- Returns:
PdfDictionary
which is a border style dictionary or null if it is not specified.
-
setBorderStyle
public PdfInkAnnotation setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()
). See ISO-320001, Table 166 andgetBorderStyle()
for more info.- Parameters:
borderStyle
- a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.- Returns:
- this
PdfInkAnnotation
instance.
-
setBorderStyle
public PdfInkAnnotation setBorderStyle(PdfName style)
Setter for the annotation's preset border style. Possible values arePdfAnnotation.STYLE_SOLID
- A solid rectangle surrounding the annotation.PdfAnnotation.STYLE_DASHED
- A dashed rectangle surrounding the annotation.PdfAnnotation.STYLE_BEVELED
- A simulated embossed rectangle that appears to be raised above the surface of the page.PdfAnnotation.STYLE_INSET
- A simulated engraved rectangle that appears to be recessed below the surface of the page.PdfAnnotation.STYLE_UNDERLINE
- A single line along the bottom of the annotation rectangle.
- Parameters:
style
- The new value for the annotation's border style.- Returns:
- this
PdfInkAnnotation
instance. - See Also:
getBorderStyle()
-
setDashPattern
public PdfInkAnnotation setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style. This property has affect only ifPdfAnnotation.STYLE_DASHED
style was used for the annotation border style (seesetBorderStyle(PdfName)
. See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.- Parameters:
dashPattern
- a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.- Returns:
- this
PdfInkAnnotation
instance.
-
-