---
title: "TextAlignment"
url: "https://reference.aspose.com/pdf/java/com.aspose.pdf/textalignment/"
product: "Aspose.PDF for Java API Reference"
description: "Alignment of text in annotation."
---

**Inheritance:**
java.lang.Object, java.lang.Enum < TextAlignment > com.aspose.pdf.TextAlignment, java.lang.Enum < TextAlignment >, com.aspose.pdf.TextAlignment

**All Implemented Interfaces:**
Serializable, Comparable < TextAlignment >

```
public enum TextAlignment extends Enum < TextAlignment >
```

Alignment of text in annotation.

## Fields

| Field | Description |
| --- | --- |
| [Center](#Center) | Text is centered. |
| [Left](#Left) | Text is aligned to left. |
| [Right](#Right) | Text is aligned to right. |

## Methods

| Method | Description |
| --- | --- |
| [getValue](#getValue--) |  |
| [valueOf](#valueOf-java.lang.String-) | Returns the enum constant of this type with the specified name. |
| [values](#values--) | Returns an array containing the constants of this enum type, in the order they are declared. |

### Center {#Center}
```
public static final TextAlignment Center
```

Text is centered.

### Left {#Left}
```
public static final TextAlignment Left
```

Text is aligned to left.

### Right {#Right}
```
public static final TextAlignment Right
```

Text is aligned to right.

### getValue {#getValue--}
```
public int getValue()
```



### valueOf {#valueOf-java.lang.String-}
Returns the enum constant of this type with the specified name.

### values {#values--}
```
public static TextAlignment [] values()
```

Returns an array containing the constants of this enum type, in the order they are declared.

**Returns:**
an array containing the constants of this enum type, in the order they are declared
