FreeTextAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph com.aspose.pdf.Annotation com.aspose.pdf.MarkupAnnotation com.aspose.pdf.FreeTextAnnotation, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation com.aspose.pdf.MarkupAnnotation com.aspose.pdf.FreeTextAnnotation, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation com.aspose.pdf.FreeTextAnnotation, com.aspose.pdf.MarkupAnnotation, com.aspose.pdf.FreeTextAnnotation

All Implemented Interfaces: com.aspose.ms.System.ICloneable, com.aspose.pdf.engine.ITitledAnnotation

public final class FreeTextAnnotation extends MarkupAnnotation

Represents a free text annotation that displays text directly on the page. Unlike an ordinary text annotation, a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text is always visible.

Constructors

ConstructorDescription
FreeTextAnnotationConstructor to use with Generator.
FreeTextAnnotationCreates new FreeText annotation on the specified page.

Methods

MethodDescription
acceptAccepts visitor object to process the annotation.
getAnnotationTypeGets type of annotation.
getCalloutArray of point specifying callout line.
getDefaultAppearanceGets the default appearance string to be used in formatting the text.
getDefaultAppearanceObjectObject which represents default appearance of FreeText annotation.
getDefaultStyleGets a default style string.
getEndingStyleGets line ending style for line ending point.
getIntentGets the intent of the free text annotation.
getJustificationGets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.
getRotateAngle of annotation rotation.
getStartingStyleGets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.
getTextRectangleRectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. The inner rectangle is where the annotation’s text should be displayed.
getTextStyleGets or sets style of the text in appearance. when text style is changed, text appearance is updated.
isValidXml
setCalloutArray of point specifying callout line.
setDefaultAppearanceSets the default appearance string to be used in formatting the text.
setDefaultStyleSets a default style string.
setEndingStyleSets line ending style for line ending point.
setIntentSets the intent of the free text annotation.
setJustificationSets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.
setRotateAngle of annotation rotation.
setStartingStyleGets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.
setTextRectangleRectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. The inner rectangle is where the annotation’s text should be displayed.
setTextStyleSets the formatting determined by the parameter textStyle for a text fragment from fromInd index to toInd index.
setTextStyleSets the formatting determined by the parameter textStyle for all annotation text.
setTextStyleSets style of the text in appearance. when text style is changed, text appearance is updated.
updateAppearanceUpdates the Appearance, after text has been changed/moved.

FreeTextAnnotation

Constructor to use with Generator.

FreeTextAnnotation

Creates new FreeText annotation on the specified page.

accept

Accepts visitor object to process the annotation.

getAnnotationType

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: int value

getCallout

public final Point [] getCallout()

Array of point specifying callout line.

Returns: array of Point

getDefaultAppearance

public String getDefaultAppearance()

Gets the default appearance string to be used in formatting the text.

Returns: String value

getDefaultAppearanceObject

public final DefaultAppearance getDefaultAppearanceObject()

Object which represents default appearance of FreeText annotation.

Returns: DefaultAppearance object

getDefaultStyle

public String getDefaultStyle()

Gets a default style string.

Returns: String value

getEndingStyle

public LineEnding getEndingStyle()

Gets line ending style for line ending point.

Returns: LineEnding value @see LineEnding

getIntent

public FreeTextIntent getIntent()

Gets the intent of the free text annotation.

Returns: int value @see FreeTextIntent

getJustification

public Justification getJustification()

Gets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.

Returns: int value @see Justification

getRotate

public Rotation getRotate()

Angle of annotation rotation.

Returns: Rotation element @see Rotation

getStartingStyle

public final LineEnding getStartingStyle()

Gets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.

Returns: LineEnding element

getTextRectangle

public final Rectangle getTextRectangle()

Rectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. The inner rectangle is where the annotation’s text should be displayed.

Returns: Rectangle instance

getTextStyle

public TextStyle getTextStyle()

Gets or sets style of the text in appearance. when text style is changed, text appearance is updated.

Returns: TextStyle value

isValidXml

setCallout

Array of point specifying callout line.

setDefaultAppearance

Sets the default appearance string to be used in formatting the text.

setDefaultStyle

Sets a default style string.

setEndingStyle

Sets line ending style for line ending point.

setIntent

Sets the intent of the free text annotation.

setJustification

Sets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.

setRotate

Angle of annotation rotation.

setStartingStyle

Gets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.

setTextRectangle

Rectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. The inner rectangle is where the annotation’s text should be displayed.

setTextStyle

public final void setTextStyle(int fromInd, int toInd, int textStyles)

Sets the formatting determined by the parameter textStyle for a text fragment from fromInd index to toInd index.

Parameters:

ParameterTypeDescription
fromIndStarting index of the text fragment (from 0).
toIndEnd index of the text fragment (counting from 0, this not included).
textStylesStyle(s) applied for text fragment.

setTextStyle

Sets the formatting determined by the parameter textStyle for all annotation text.

setTextStyle

Sets style of the text in appearance. when text style is changed, text appearance is updated.

updateAppearance

public void updateAppearance()

Updates the Appearance, after text has been changed/moved.