# PageSize Class

> An instance of the PageSize class represents the page size of a TX Text Control document or document section. The measure depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 16.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > PageSize Class
- **643 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/llms-full.txt

---

### Description

An instance of the PageSize class represents the page size of a TX Text Control document or document section. The measure depends on the [TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/pageunit-property/llms-full.txt), [WPF.TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt) or [ServerTextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/pageunit-property/llms-full.txt) property.

### Syntax

```csharp
public class PageSize
```

```vbnet
Public Class PageSize
```

### Examples

The following example configures page size for the current document.

```csharp
PageSize pageSize = textControl.PageSize;
pageSize.Width = 12240;
pageSize.Height = 15840;
```

```vbnet
Dim pageSize As PageSize = textControl.PageSize
pageSize.Width = 12240
pageSize.Height = 15840
```

---

## In This Section

- [PageSize.Attribute Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/attribute-enumeration/llms-full.txt): Determines a certain attribute. This enumeration is used with the Selection.IsCommonValueSelected method.
- [PageSize Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/constructor/llms-full.txt): Creates a new instance of the PageSize class. The measure for the width and height parameters depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.
- [PageSize.Height Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/height-property/llms-full.txt): Specifies the page height of a document or document section. The measure depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.
- [PageSize.Width Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/width-property/llms-full.txt): Specifies the page width of a document or document section. The measure depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.

---

## Nearby

- **Previous:** [PageNumberFieldCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/remove-method/llms-full.txt)
- **Next:** [PageSize.Attribute Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/attribute-enumeration/llms-full.txt)
