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
| Constructor | Description |
|---|---|
| FreeTextAnnotation | Constructor to use with Generator. |
| FreeTextAnnotation | Creates new FreeText annotation on the specified page. |
Methods
| Method | Description |
|---|---|
| accept | Accepts visitor object to process the annotation. |
| getAnnotationType | Gets type of annotation. |
| getCallout | Array of point specifying callout line. |
| getDefaultAppearance | Gets the default appearance string to be used in formatting the text. |
| getDefaultAppearanceObject | Object which represents default appearance of FreeText annotation. |
| getDefaultStyle | Gets a default style string. |
| getEndingStyle | Gets line ending style for line ending point. |
| getIntent | Gets the intent of the free text annotation. |
| getJustification | Gets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text. |
| getRotate | Angle of annotation rotation. |
| getStartingStyle | Gets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle. |
| 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. |
| getTextStyle | Gets or sets style of the text in appearance. when text style is changed, text appearance is updated. |
| 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 | Sets the formatting determined by the parameter textStyle for a text fragment from fromInd index to toInd index. |
| 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 | Updates 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:
| Parameter | Type | Description |
|---|---|---|
| fromInd | Starting index of the text fragment (from 0). | |
| toInd | End index of the text fragment (counting from 0, this not included). | |
| textStyles | Style(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.