**Inheritance:**
java.lang.Object, com.aspose.pdf.facades.FormattedText

```
public final class FormattedText extends Object
```

Class which represents formatted text. Contains information about text and its color, size, style.

## Constructors

| Constructor | Description |
| --- | --- |
| [FormattedText](#FormattedText--) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-java.lang.String-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-java.awt.Color-java.lang.String-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-) | Initializes FormattedText. |
| [FormattedText](#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-) | Initializes FormattedText. |

## Methods

| Method | Description |
| --- | --- |
| [addNewLineText](#addNewLineText-java.lang.String-) | Adds a new line to the FormattedText object and sets the newLineText to the next line's text. |
| [addNewLineText](#addNewLineText-java.lang.String-float-) | Adds a new line to the FormattedText object and sets the newLineText to the next line's text. |
| [getBackColor](#getBackColor--) | Internal Gets back color |
| [getFirstLine](#getFirstLine--) | Gets first line |
| [getFont](#getFont--) | Gets font |
| [getFontSize](#getFontSize--) | Gets font size |
| [getText](#getText--) | For Internal usage only |
| [getTextColor](#getTextColor--) | Internal Gets text color |
| [getTextHeight](#getTextHeight--) | Gets height of text. |
| [getTextWidth](#getTextWidth--) | Gets width of text. |
| [isCjk](#isCjk--) | Checks if text is CJK (Chinese, Japanese, or Korean). |
| [setCjkFontStyle](#setCjkFontStyle--) | Changes FormattedText font style for CJK (Chinese, Japanese, or Korean) font. |

### FormattedText {#FormattedText--}
```
public FormattedText()
```

Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-java.awt.Color-java.lang.String-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-java.awt.Color-java.lang.String-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-}
Initializes FormattedText.

### FormattedText {#FormattedText-java.lang.String-com.aspose.pdf.facades.FontColor-com.aspose.pdf.facades.FontStyle-int-boolean-float-float-}
Initializes FormattedText.

### addNewLineText {#addNewLineText-java.lang.String-}
Adds a new line to the FormattedText object and sets the newLineText to the next line's text.

### addNewLineText {#addNewLineText-java.lang.String-float-}
Adds a new line to the FormattedText object and sets the newLineText to the next line's text.

### getBackColor {#getBackColor--}
```
public com.aspose.ms.System.Drawing.Color getBackColor()
```

Internal Gets back color

**Returns:**
Color element

### getFirstLine {#getFirstLine--}
```
public String getFirstLine()
```

Gets first line

**Returns:**
String value

### getFont {#getFont--}
```
public Font getFont()
```

Gets font

**Returns:**
Font element

### getFontSize {#getFontSize--}
```
public float getFontSize()
```

Gets font size

**Returns:**
float value

### getText {#getText--}
```
public com.aspose.ms.System.Collections.Generic.List< String > getText()
```

For Internal usage only

**Returns:**
Internal object

### getTextColor {#getTextColor--}
```
public com.aspose.ms.System.Drawing.Color getTextColor()
```

Internal Gets text color

**Returns:**
Color element

### getTextHeight {#getTextHeight--}
```
public float getTextHeight()
```

Gets height of text.

**Returns:**
float value

### getTextWidth {#getTextWidth--}
```
public float getTextWidth()
```

Gets width of text.

**Returns:**
float value

### isCjk {#isCjk--}
```
public final boolean isCjk()
```

Checks if text is CJK (Chinese, Japanese, or Korean).

**Returns:**
True if text is CJK. Otherwise false.

### setCjkFontStyle {#setCjkFontStyle--}
```
public final void setCjkFontStyle()
```

Changes FormattedText font style for CJK (Chinese, Japanese, or Korean) font.
