# PageSize.Width Property

> Specifies the page width of a 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:** Property
- **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.Width Property
- **576 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/width-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/width-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/width-property/llms-full.txt

---

### Description

Specifies the page width of a 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 double Width { get; set; }
```

```vbnet
Public Property Width As Double
```

### Examples

The following example configures page size for the current document by using `PageSize.Width`.

```csharp
PageSize pageSize = textControl.PageSize;

pageSize.Width = 1.0;
Console.WriteLine($"Width used by Page Size: {pageSize.Width}");

pageSize.Width = 12240;
pageSize.Height = 15840;
```

```vbnet
Dim pageSize As PageSize = textControl.PageSize

pageSize.Width = 1.0
Console.WriteLine($"Width used by Page Size: {pageSize.Width}")

pageSize.Width = 12240
pageSize.Height = 15840
```

### Limitations

The maximum value depends on the capabilities of the selected printer and must not exceed 22.75 inch.

### Remarks

The width's default value is 8.5 inch.

The property returns its default value when the text selection contains multiple sections with mixed page widths. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [PageSize.Height Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagesize/height-property/llms-full.txt)
- **Next:** [PaperSize Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/papersize/llms-full.txt)
