---
Product: Aspose.PDF
Platform: go
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/go/textfragment
---

# TextFragment

## Overview

`TextFragment` is a type in Aspose.PDF FOSS for Go.

TextFragment represents a contiguous run of text with uniform font.

Properties: `Bold`, `CharSpacing`, `Color`, `FontName`, `FontSize`, `Height`, and 8 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Text` | `string` | Read/Write | Gets the text. |
| `X` | `float64` | Read/Write | Gets the x. |
| `Y` | `float64` | Read/Write | Gets the y. |
| `Width` | `float64` | Read/Write | Gets the width. |
| `FontName` | `string` | Read/Write | Gets the font name. |
| `FontSize` | `float64` | Read/Write | Gets the font size. |
| `Height` | `float64` | Read/Write | Gets the height. |
| `Bold` | `bool` | Read/Write | Gets the bold. |
| `Italic` | `bool` | Read/Write | Gets the italic. |
| `CharSpacing` | `float64` | Read/Write | Gets the char spacing. |
| `Color` | `Color` | Read/Write | Gets the color. |
| `IsSubscript` | `bool` | Read/Write | Gets the is subscript. |
| `IsSuperscript` | `bool` | Read/Write | Gets the is superscript. |
| `Rotation` | `float64` | Read/Write | Gets the rotation. |

## See Also

- [Aspose.PDF — Enterprise API Reference](https://reference.aspose.com/pdf/)