Package com.itextpdf.kernel.pdf.annot
Class PdfPolyGeomAnnotation
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.PdfPolyGeomAnnotation
-
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
ModifierConstructorDescriptionprotected
PdfPolyGeomAnnotation
(PdfDictionary pdfObject) Instantiates a newPdfPolyGeomAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document. -
Method Summary
Modifier and TypeMethodDescriptionstatic PdfPolyGeomAnnotation
createPolygon
(Rectangle rect, float[] vertices) static PdfPolyGeomAnnotation
createPolyLine
(Rectangle rect, float[] vertices) Gets a border effect dictionary that specifies an effect that shall be applied to the border of the annotations.The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.The interior color which is used to fill the annotation's line endings.getPath()
PDF 2.0.setBorderEffect
(PdfDictionary borderEffect) Sets a border effect dictionary that specifies an effect that shall be applied to the border of the annotations.setBorderStyle
(PdfDictionary borderStyle) Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()
).setBorderStyle
(PdfName style) Setter for the annotation's preset border style.setDashPattern
(PdfArray dashPattern) Setter for the annotation's preset dashed border style.setInteriorColor
(float[] interiorColor) An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the annotation's line endings.setInteriorColor
(PdfArray interiorColor) An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the annotation's line endings.setLineEndingStyles
(PdfArray lineEndingStyles) setMeasure
(PdfDictionary measure) PDF 2.0.setVertices
(float[] vertices) setVertices
(PdfArray vertices) 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, getSubtype, 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 Details
-
PdfPolyGeomAnnotation
Instantiates a newPdfPolyGeomAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.- Parameters:
-
pdfObject
- thePdfDictionary
representing annotation object - See Also:
-
-
Method Details
-
createPolygon
-
createPolyLine
-
getVertices
-
setVertices
-
setVertices
-
getLineEndingStyles
-
setLineEndingStyles
-
getMeasure
-
setMeasure
-
getPath
PDF 2.0. An array of n arrays, each supplying the operands for a path building operator (m, l or c). Each of the n arrays shall contain pairs of values specifying the points (x and y values) for a path drawing operation. The first array shall be of length 2 and specifies the operand of a moveto operator which establishes a current point. Subsequent arrays of length 2 specify the operands of lineto operators. Arrays of length 6 specify the operands for curveto operators. Each array is processed in sequence to construct the path.- Returns:
-
path, or
null
if path is not set
-
setPath
PDF 2.0. An array of n arrays, each supplying the operands for a path building operator (m, l or c). Each of the n arrays shall contain pairs of values specifying the points (x and y values) for a path drawing operation. The first array shall be of length 2 and specifies the operand of a moveto operator which establishes a current point. Subsequent arrays of length 2 specify the operands of lineto operators. Arrays of length 6 specify the operands for curveto operators. Each array is processed in sequence to construct the path.- Parameters:
-
path
- the path to set - Returns:
-
this
PdfPolyGeomAnnotation
instance
-
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
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
PdfPolyGeomAnnotation
instance.
-
setBorderStyle
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
PdfPolyGeomAnnotation
instance. - See Also:
-
setDashPattern
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
PdfPolyGeomAnnotation
instance.
-
getBorderEffect
Gets a border effect dictionary that specifies an effect that shall be applied to the border of the annotations.- Returns:
-
a
PdfDictionary
, which is a border effect dictionary (see ISO-320001, Table 167).
-
setBorderEffect
Sets a border effect dictionary that specifies an effect that shall be applied to the border of the annotations.- Parameters:
-
borderEffect
- aPdfDictionary
which contents shall be specified in accordance to ISO-320001, Table 167. - Returns:
-
this
PdfPolyGeomAnnotation
instance.
-
getInteriorColor
The interior color which is used to fill the annotation's line endings.- Returns:
-
Color
of eitherDeviceGray
,DeviceRgb
orDeviceCmyk
type which defines interior color of the annotation, or null if interior color is not specified.
-
setInteriorColor
An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the annotation's line endings.- Parameters:
-
interiorColor
- aPdfArray
of numbers in the range 0.0 to 1.0. The number of array elements determines the colour space in which the colour is defined: 0 - No colour, transparent; 1 - DeviceGray, 3 - DeviceRGB, 4 - DeviceCMYK. For thePdfRedactAnnotation
number of elements shall be equal to 3 (which defines DeviceRGB colour space). - Returns:
-
this
PdfPolyGeomAnnotation
instance.
-
setInteriorColor
An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the annotation's line endings.- Parameters:
-
interiorColor
- an array of floats in the range 0.0 to 1.0. - Returns:
-
this
PdfPolyGeomAnnotation
instance.
-