public class PdfFreeTextAnnotation extends PdfMarkupAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
CENTERED |
static int |
LEFT_JUSTIFIED
Text justification options.
|
static int |
RIGHT_JUSTIFIED |
inReplyTo, popup
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 and Description |
---|
PdfFreeTextAnnotation(PdfDictionary pdfObject)
Deprecated.
Use
PdfAnnotation.makeAnnotation(PdfObject) instead. Will be made protected in 7.1
|
PdfFreeTextAnnotation(Rectangle rect, PdfString contents)
Creates new instance
|
PdfFreeTextAnnotation(Rectangle rect, String appearanceString)
Deprecated.
unintuitive, will be removed in 7.1 use
PdfFreeTextAnnotation(Rectangle, PdfString) instead
|
Modifier and Type | Method and Description |
---|---|
PdfDictionary |
getBorderEffect()
A border effect dictionary that specifies an effect that shall be applied to the border of the annotations.
|
PdfDictionary |
getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.
|
PdfArray |
getCalloutLine() |
PdfString |
getDefaultAppearance()
The default appearance string that shall be used in formatting the text.
|
PdfString |
getDefaultStyleString() |
int |
getJustification()
A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified.
|
PdfName |
getLineEndingStyle() |
PdfArray |
getRectangleDifferences()
A set of four numbers describing the numerical differences between two rectangles: the Rect entry of the annotation and the inner rectangle where the annotation's text should be displayed
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
PdfFreeTextAnnotation |
setBorderEffect(PdfDictionary borderEffect)
Sets a border effect dictionary that specifies an effect that shall be applied to the border of the annotations.
|
PdfFreeTextAnnotation |
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry ( PdfAnnotation.getBorder() ).
|
PdfFreeTextAnnotation |
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.
|
PdfFreeTextAnnotation |
setCalloutLine(float[] calloutLine) |
PdfFreeTextAnnotation |
setCalloutLine(PdfArray calloutLine) |
PdfFreeTextAnnotation |
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.
|
PdfFreeTextAnnotation |
setDefaultAppearance(AnnotationDefaultAppearance da) |
PdfFreeTextAnnotation |
setDefaultAppearance(PdfString appearanceString)
The default appearance string that shall be used in formatting the text.
|
PdfFreeTextAnnotation |
setDefaultStyleString(PdfString defaultStyleString) |
PdfFreeTextAnnotation |
setJustification(int justification)
A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified.
|
PdfFreeTextAnnotation |
setLineEndingStyle(PdfName lineEndingStyle) |
PdfFreeTextAnnotation |
setRectangleDifferences(PdfArray rect)
A set of four numbers describing the numerical differences between two rectangles: the Rect entry of the annotation and the inner rectangle where the annotation's text should be displayed
|
getCreationDate, getExternalData, getIconName, getInReplyTo, getInReplyToObject, getIntent, getInteriorColor, getOpacity, getPopup, getPopupObject, getReplyType, getRichText, getSubject, getText, setCreationDate, setExternalData, setIconName, setInReplyTo, setIntent, setInteriorColor, setInteriorColor, setOpacity, setPopup, setReplyType, setRichText, setSubject, setText
flush, 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, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final int LEFT_JUSTIFIED
public static final int CENTERED
public static final int RIGHT_JUSTIFIED
public PdfFreeTextAnnotation(Rectangle rect, PdfString contents)
rect
- - rectangle that specifies annotation position and bounds on page
contents
- - the displayed text
@Deprecated public PdfFreeTextAnnotation(Rectangle rect, String appearanceString)
PdfFreeTextAnnotation(Rectangle, PdfString)
instead
rect
- - bounding rectangle of annotation
appearanceString
- - appearance string of annotation
@Deprecated public PdfFreeTextAnnotation(PdfDictionary pdfObject)
PdfAnnotation.makeAnnotation(PdfObject)
instead. Will be made protected in 7.1
pdfObject
- object representing this annotation
public PdfName getSubtype()
PdfAnnotation
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 PdfString getDefaultStyleString()
public PdfFreeTextAnnotation setDefaultStyleString(PdfString defaultStyleString)
public PdfString getDefaultAppearance()
getDefaultAppearance
in class PdfMarkupAnnotation
PdfString
that specifies the default appearance, or null if default appereance is not specified.
public PdfFreeTextAnnotation setDefaultAppearance(PdfString appearanceString)
setDefaultAppearance
in class PdfMarkupAnnotation
appearanceString
- a PdfString
that specifies the default appearance.
PdfFreeTextAnnotation
instance.
public PdfFreeTextAnnotation setDefaultAppearance(AnnotationDefaultAppearance da)
public PdfArray getCalloutLine()
public PdfFreeTextAnnotation setCalloutLine(float[] calloutLine)
public PdfFreeTextAnnotation setCalloutLine(PdfArray calloutLine)
public PdfName getLineEndingStyle()
public PdfFreeTextAnnotation setLineEndingStyle(PdfName lineEndingStyle)
public int getJustification()
getJustification
in class PdfMarkupAnnotation
public PdfFreeTextAnnotation setJustification(int justification)
setJustification
in class PdfMarkupAnnotation
justification
- a code specifying the form of quadding (justification).
PdfFreeTextAnnotation
instance.
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 PdfFreeTextAnnotation 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.
PdfFreeTextAnnotation
instance.
public PdfFreeTextAnnotation 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.
PdfFreeTextAnnotation
instance.
getBorderStyle()
public PdfFreeTextAnnotation 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.
PdfFreeTextAnnotation
instance.
public PdfArray getRectangleDifferences()
getRectangleDifferences
in class PdfMarkupAnnotation
PdfArray
with four numbers which correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the inner rectangle, respectively.
public PdfFreeTextAnnotation setRectangleDifferences(PdfArray rect)
setRectangleDifferences
in class PdfMarkupAnnotation
rect
- a PdfArray
with four numbers which correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the inner rectangle, respectively. Each value shall be greater than or equal to 0. The sum of the top and bottom differences shall be less than the height of Rect, and the sum of the left and right differences shall be less than the width of Rect.
PdfFreeTextAnnotation
instance.
public PdfDictionary getBorderEffect()
getBorderEffect
in class PdfMarkupAnnotation
PdfDictionary
, which is a border effect dictionary (see ISO-320001, Table 167).
public PdfFreeTextAnnotation setBorderEffect(PdfDictionary borderEffect)
setBorderEffect
in class PdfMarkupAnnotation
borderEffect
- a PdfDictionary
which contents shall be specified in accordance to ISO-320001, Table 167.
PdfFreeTextAnnotation
instance.
Copyright © 1998–2018 iText Group NV. All rights reserved.