public class PdfLineAnnotation extends PdfMarkupAnnotation
inReplyTo, popupAccepted, 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 and Description |
|---|
PdfLineAnnotation(PdfDictionary pdfDictionary)
Deprecated.
Use
PdfAnnotation.makeAnnotation(PdfObject) instead. Will be made protected in 7.1
|
PdfLineAnnotation(Rectangle rect, float[] line)
Creates a PdfLineAnnotation instance.
|
| Modifier and Type | Method and Description |
|---|---|
PdfDictionary |
getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.
|
PdfArray |
getCaptionOffset()
An array of two numbers that specifies the offset of the caption text from its normal position.
|
PdfName |
getCaptionPosition()
A name describing the annotation's caption positioning.
|
boolean |
getContentsAsCaption()
If true, the text specified by the PdfName.Contents or PdfName.RC entries (see PdfAnnotation.getContents() and PdfMarkupAnnotation.getRichText()) is replicated as a caption in the appearance of the line.
|
Color |
getInteriorColor()
The interior color which is used to fill the annotation's line endings.
|
float |
getLeaderLine()
Deprecated.
use
getLeaderLineLength() instead.
|
float |
getLeaderLineExtension()
A non-negative number that represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines.
|
float |
getLeaderLineLength()
The length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself.
|
float |
getLeaderLineOffset()
A non-negative number that represents the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.
|
PdfArray |
getLine()
An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space.
|
PdfArray |
getLineEndingStyles()
An array of two names specifying the line ending styles that is used in drawing the line.
|
PdfDictionary |
getMeasure()
A measure dictionary (see ISO-320001, Table 261) that specifies the scale and units that apply to the line annotation.
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
PdfLineAnnotation |
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry ( PdfAnnotation.getBorder()).
|
PdfLineAnnotation |
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.
|
PdfLineAnnotation |
setCaptionOffset(float[] captionOffset)
Sets the offset of the caption text from its normal position.
|
PdfLineAnnotation |
setCaptionOffset(PdfArray captionOffset)
Sets the offset of the caption text from its normal position.
|
PdfLineAnnotation |
setCaptionPosition(PdfName captionPosition)
Sets annotation's caption positioning.
|
PdfLineAnnotation |
setContentsAsCaption(boolean contentsAsCaption)
If set to true, the text specified by the PdfName.Contents or PdfName.RC entries (see PdfAnnotation.getContents() and PdfMarkupAnnotation.getRichText()) will be replicated as a caption in the appearance of the line.
|
PdfLineAnnotation |
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.
|
PdfLineAnnotation |
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.
|
PdfLineAnnotation |
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.
|
PdfLineAnnotation |
setLeaderLine(float leaderLine)
Deprecated.
use
setLeaderLineLength(float) instead.
|
PdfLineAnnotation |
setLeaderLineExtension(float leaderLineExtension)
Sets the length of leader line extensions that extend from the line proper 180 degrees from the leader lines.
|
PdfLineAnnotation |
setLeaderLineLength(float leaderLineLength)
Sets the length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself.
|
PdfLineAnnotation |
setLeaderLineOffset(float leaderLineOffset)
Sets the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.
|
PdfLineAnnotation |
setLineEndingStyles(PdfArray lineEndingStyles)
Sets the line ending styles that are used in drawing the line.
|
PdfLineAnnotation |
setMeasure(PdfDictionary measure)
Sets a measure dictionary that specifies the scale and units that apply to the line annotation.
|
getBorderEffect, getCreationDate, getDefaultAppearance, getExternalData, getIconName, getInReplyTo, getInReplyToObject, getIntent, getJustification, getOpacity, getPopup, getPopupObject, getRectangleDifferences, getReplyType, getRichText, getSubject, getText, setBorderEffect, setCreationDate, setDefaultAppearance, setExternalData, setIconName, setInReplyTo, setIntent, setJustification, setOpacity, setPopup, setRectangleDifferences, setReplyType, setRichText, setSubject, setTextflush, getAction, getAdditionalAction, getAppearanceCharacteristics, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getName, getNormalAppearanceObject, getOpen, getPage, getPageObject, getQuadPoints, getRectangle, getRolloverAppearanceObject, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, makeAnnotation, put, remove, resetFlag, setAction, setAdditionalAction, setAppearance, setAppearance, setAppearanceCharacteristics, setAppearanceState, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLayer, setName, setNormalAppearance, setNormalAppearance, setOpen, setPage, setQuadPoints, setRectangle, setRolloverAppearance, setRolloverAppearance, setStructParentIndex, setTitleensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfLineAnnotation(Rectangle rect, float[] line)
PdfLineAnnotation instance.
rect - the annotation rectangle, defining the location of the annotation on the page in default user space units. See PdfAnnotation.setRectangle(PdfArray).
line - an array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. See also getLine().
@Deprecated public PdfLineAnnotation(PdfDictionary pdfDictionary)
PdfAnnotation.makeAnnotation(PdfObject) instead. Will be made protected in 7.1
PdfLineAnnotation instance from the given PdfDictionary that represents annotation object. This method is useful for property reading in reading mode or modifying in stamping mode.
pdfDictionary - a PdfDictionary that represents existing annotation in the document.
public PdfName getSubtype()
PdfName which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.
getSubtype in class PdfAnnotation
public PdfArray getLine()
PdfName.LL (see getLeaderLine()) entry is present, this value represents the endpoints of the leader lines rather than the endpoints of the line itself.
public PdfDictionary getBorderStyle()
PdfAnnotation.getBorder()). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (see PdfAnnotation.getAppearanceDictionary()) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.
getBorderStyle in class PdfAnnotation
PdfDictionary which is a border style dictionary or null if it is not specified.
public PdfLineAnnotation setBorderStyle(PdfDictionary borderStyle)
PdfAnnotation.getBorder()). See ISO-320001, Table 166 and getBorderStyle() for more info.
setBorderStyle in class PdfAnnotation
borderStyle - a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.
PdfLineAnnotation instance.
public PdfLineAnnotation setBorderStyle(PdfName style)
PdfAnnotation.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.setBorderStyle in class PdfAnnotation
style - The new value for the annotation's border style.
PdfLineAnnotation instance.
getBorderStyle()
public PdfLineAnnotation setDashPattern(PdfArray dashPattern)
PdfAnnotation.STYLE_DASHED style was used for the annotation border style (see setBorderStyle(PdfName). See ISO-320001 8.4.3.6, “Line Dash Pattern” for the format in which dash pattern shall be specified.
setDashPattern in class PdfAnnotation
dashPattern - a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.
PdfLineAnnotation instance.
public PdfArray getLineEndingStyles()
PdfName.L array (see getLine(). For possible values see setLineEndingStyles(PdfArray).
public PdfLineAnnotation setLineEndingStyles(PdfArray lineEndingStyles)
PdfName.L array (see getLine(). Possible values for styles are:
PdfName.Square - A square filled with the annotation's interior color, if any; PdfName.Circle - A circle filled with the annotation's interior color, if any; PdfName.Diamond - A diamond shape filled with the annotation's interior color, if any; PdfName.OpenArrow - Two short lines meeting in an acute angle to form an open arrowhead; PdfName.ClosedArrow - Two short lines meeting in an acute angle as in the PdfName.OpenArrow style and connected by a third line to form a triangular closed arrowhead filled with the annotation's interior color, if any; PdfName.None - No line ending; PdfName.Butt - A short line at the endpoint perpendicular to the line itself; PdfName.ROpenArrow - Two short lines in the reverse direction from PdfName.OpenArrow; PdfName.RClosedArrow - A triangular closed arrowhead in the reverse direction from PdfName.ClosedArrow; PdfName.Slash - A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself; lineEndingStyles - An array of two names specifying the line ending styles that is used in drawing the line.
PdfLineAnnotation instance.
public Color getInteriorColor()
getInteriorColor in class PdfMarkupAnnotation
Color of either DeviceGray, DeviceRgb or DeviceCmyk type which defines interior color of the annotation, or null if interior color is not specified.
public PdfLineAnnotation setInteriorColor(PdfArray interiorColor)
setInteriorColor in class PdfMarkupAnnotation
interiorColor - a PdfArray 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 the PdfRedactAnnotation number of elements shall be equal to 3 (which defines DeviceRGB colour space).
PdfLineAnnotation instance.
public PdfLineAnnotation setInteriorColor(float[] interiorColor)
setInteriorColor in class PdfMarkupAnnotation
interiorColor - an array of floats in the range 0.0 to 1.0.
PdfLineAnnotation instance.
@Deprecated public float getLeaderLine()
getLeaderLineLength() instead.
PdfName.L (see getLine()); a negative value indicates the opposite direction.
@Deprecated public PdfLineAnnotation setLeaderLine(float leaderLine)
setLeaderLineLength(float) instead.
PdfName.L (see getLine()); a negative value indicates the opposite direction.
leaderLine - a float specifying the length of leader lines in default user space.
PdfLineAnnotation instance.
public float getLeaderLineLength()
PdfName.L (see getLine()); a negative value indicates the opposite direction.
public PdfLineAnnotation setLeaderLineLength(float leaderLineLength)
PdfName.L (see getLine()); a negative value indicates the opposite direction.
leaderLineLength - a float specifying the length of leader lines in default user space.
PdfLineAnnotation instance.
public float getLeaderLineExtension()
public PdfLineAnnotation setLeaderLineExtension(float leaderLineExtension)
PdfName.LL (see setLeaderLine(float)) is set.
leaderLineExtension - a non-negative float that represents the length of leader line extensions.
PdfLineAnnotation instance.
public float getLeaderLineOffset()
public PdfLineAnnotation setLeaderLineOffset(float leaderLineOffset)
leaderLineOffset - a non-negative number that represents the length of the leader line offset.
PdfLineAnnotation instance.
public boolean getContentsAsCaption()
PdfName.Contents or PdfName.RC entries (see PdfAnnotation.getContents() and PdfMarkupAnnotation.getRichText()) is replicated as a caption in the appearance of the line.
public PdfLineAnnotation setContentsAsCaption(boolean contentsAsCaption)
PdfName.Contents or PdfName.RC entries (see PdfAnnotation.getContents() and PdfMarkupAnnotation.getRichText()) will be replicated as a caption in the appearance of the line.
contentsAsCaption - true, if the annotation text should be replicated as a caption, false otherwise.
PdfLineAnnotation instance.
public PdfName getCaptionPosition()
PdfName.Inline, meaning the caption is centered inside the line, and PdfName.Top, meaning the caption is on top of the line.
PdfName.Inline).
public PdfLineAnnotation setCaptionPosition(PdfName captionPosition)
PdfName.Inline, meaning the caption is centered inside the line, and PdfName.Top, meaning the caption is on top of the line.
captionPosition - a name describing the annotation's caption positioning.
PdfLineAnnotation instance.
public PdfDictionary getMeasure()
PdfDictionary that represents a measure dictionary.
public PdfLineAnnotation setMeasure(PdfDictionary measure)
measure - a PdfDictionary that represents a measure dictionary, see ISO-320001, Table 261 for valid contents specification.
PdfLineAnnotation instance.
public PdfArray getCaptionOffset()
PdfArray of two numbers that specifies the offset of the caption text from its normal position, or null if caption offset is not explicitly specified (in this case a default value is used, which is [0, 0]).
public PdfLineAnnotation setCaptionOffset(PdfArray captionOffset)
captionOffset - a PdfArray of two numbers that specifies the offset of the caption text from its normal position. The first value defines the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. The second value defines the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down.
PdfLineAnnotation instance.
public PdfLineAnnotation setCaptionOffset(float[] captionOffset)
captionOffset - an array of two floats that specifies the offset of the caption text from its normal position. The first value defines the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. The second value defines the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down.
PdfLineAnnotation instance.
Copyright © 1998–2018 iText Group NV. All rights reserved.