FreeTextAnnotation
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation
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(IDocument document, DefaultAppearance appearance) | Constructor to use with Generator. |
FreeTextAnnotation(Page page, Rectangle rect, DefaultAppearance appearance) | Creates new FreeText annotation on the specified page. |
Methods
Method | Description |
---|---|
getStartingStyle() | Gets or sets line ending style for line ending point. |
setStartingStyle(int value) | Gets or sets line ending style for line ending point. |
getEndingStyle() | Gets line ending style for line ending point. |
setEndingStyle(int value) | Sets line ending style for line ending point. |
getJustification() | Gets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text. |
setJustification(int value) | Sets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text. |
accept(AnnotationSelector visitor) | Accepts visitor object to process the annotation. |
getDefaultAppearance() | Gets the default appearance string to be used in formatting the text. |
setDefaultAppearance(String value) | Sets the default appearance string to be used in formatting the text. |
getDefaultAppearanceObject() | Object which represents default appearance of FreeText annotation. |
getIntent() | Gets the intent of the free text annotation. |
setIntent(int value) | Sets the intent of the free text annotation. |
getDefaultStyle() | Gets a default style string. |
setDefaultStyle(String value) | Sets a default style string. |
getTextStyle() | Gets or sets style of the text in appearance. |
setTextStyle(TextStyle value) | Sets style of the text in appearance. |
getRotate() | Angle of annotation rotation. |
setRotate(int value) | Angle of annotation rotation. |
updateAppearance() | Updates the Appearance, after text has been changed/moved. |
getAnnotationType() | Gets type of annotation. |
getCallout() | Array of point specifying callout line. |
setCallout(Point[] value) | Array of point specifying callout line. |
getTextRectangle() | Rectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. |
setTextRectangle(Rectangle value) | Rectangle describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. |
FreeTextAnnotation(IDocument document, DefaultAppearance appearance)
public FreeTextAnnotation(IDocument document, DefaultAppearance appearance)
Constructor to use with Generator.
Parameters:
Parameter | Type | Description |
---|---|---|
document | IDocument | Document where annotation will be created. |
appearance | DefaultAppearance | Default Appearance |
FreeTextAnnotation(Page page, Rectangle rect, DefaultAppearance appearance)
public FreeTextAnnotation(Page page, Rectangle rect, DefaultAppearance appearance)
Creates new FreeText annotation on the specified page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | The document’s page where annotation should be created. |
rect | Rectangle | The annotation rectangle, defining the location of the annotation on the page. |
appearance | DefaultAppearance | The default appearance string to be used in formatting the text. |
getStartingStyle()
public final int getStartingStyle()
Gets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.
Returns: int - LineEnding element
setStartingStyle(int value)
public final void setStartingStyle(int value)
Gets or sets line ending style for line ending point. OThis property is obsolete, please use EndingStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | LineEnding element |
getEndingStyle()
public int getEndingStyle()
Gets line ending style for line ending point.
Returns: int - LineEnding value
setEndingStyle(int value)
public void setEndingStyle(int value)
Sets line ending style for line ending point.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | LineEnding value |
getJustification()
public int getJustification()
Gets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.
Returns: int - int value
setJustification(int value)
public void setJustification(int value)
Sets a code specifying the form of quadding (justification) to be used in displaying the annotation’s text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | int value |
accept(AnnotationSelector visitor)
public void accept(AnnotationSelector visitor)
Accepts visitor object to process the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | AnnotationSelector | Visitor object. |
getDefaultAppearance()
public String getDefaultAppearance()
Gets the default appearance string to be used in formatting the text.
Returns: java.lang.String - String value
setDefaultAppearance(String value)
public void setDefaultAppearance(String value)
Sets the default appearance string to be used in formatting the text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
getDefaultAppearanceObject()
public final DefaultAppearance getDefaultAppearanceObject()
Object which represents default appearance of FreeText annotation.
Returns: DefaultAppearance - DefaultAppearance object
getIntent()
public int getIntent()
Gets the intent of the free text annotation.
Returns: int - int value
setIntent(int value)
public void setIntent(int value)
Sets the intent of the free text annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | int value |
getDefaultStyle()
public String getDefaultStyle()
Gets a default style string.
Returns: java.lang.String - String value
setDefaultStyle(String value)
public void setDefaultStyle(String value)
Sets a default style string.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
getTextStyle()
public TextStyle getTextStyle()
Gets or sets style of the text in appearance. when text style is changed, text appearance is updated.
Returns: TextStyle - TextStyle value
setTextStyle(TextStyle value)
public void setTextStyle(TextStyle value)
Sets style of the text in appearance. when text style is changed, text appearance is updated.
Parameters:
Parameter | Type | Description |
---|---|---|
value | TextStyle | TextStyle object |
getRotate()
public int getRotate()
Angle of annotation rotation.
Returns: int - Rotation element
setRotate(int value)
public void setRotate(int value)
Angle of annotation rotation.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | Rotation element |
updateAppearance()
public void updateAppearance()
Updates the Appearance, after text has been changed/moved.
getAnnotationType()
public AnnotationType getAnnotationType()
Gets type of annotation.
Returns: AnnotationType - int value
getCallout()
public final Point[] getCallout()
Array of point specifying callout line.
Returns: com.aspose.pdf.Point[] - array of Point
setCallout(Point[] value)
public final void setCallout(Point[] value)
Array of point specifying callout line.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Point[] | array of Point |
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\ufffds text should be displayed.
Returns: Rectangle - Rectangle instance
setTextRectangle(Rectangle value)
public final void setTextRectangle(Rectangle value)
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\ufffds text should be displayed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Rectangle | Rectangle instance |