# TextState Class

> The text state includes parameters that affect text.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/TextState
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class TextState : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

The text state includes parameters that affect text.

These parameters include character and word spacing, font, font size, and horizontal scale.

**Referenced by:** [`Text`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Text.md), [`TextRun`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/TextRun.md)

**Uses types:** [`TextRenderMode`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/TextRenderMode.md)

## Constructors

### TextState

```csharp
Datalogics.PDFL.TextState.TextState()
```

*constructor*

Create a default text state

## Properties

### CharacterSpacing

```csharp
double Datalogics.PDFL.TextState.CharacterSpacing { get; set; }
```

The current character spacing (corresponding to the Tc operator), in unscaled text space units.

### FontSize

```csharp
double Datalogics.PDFL.TextState.FontSize { get; set; }
```

The current font size (corresponding to the Tf operator).

### HScale

```csharp
double Datalogics.PDFL.TextState.HScale { get; set; }
```

The current horizontal scaling (corresponding to the Tz operator), as a percentage of the normal glyph width. Default is 100.

### RenderMode

```csharp
TextRenderMode Datalogics.PDFL.TextState.RenderMode { get; set; }
```

The current text rendering mode (corresponding to the Tr operator).

### TextRise

```csharp
double Datalogics.PDFL.TextState.TextRise { get; set; }
```

The current text rise (corresponding to the Ts operator), in unscaled text space units.

### WordSpacing

```csharp
double Datalogics.PDFL.TextState.WordSpacing { get; set; }
```

The current word spacing (corresponding to the Tw operator), in unscaled text space units.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.TextState.Dispose()
```

**Returns:** `void`
