# ServerTextControl.PageMargins Property

> Gets or sets the margins for the pages of the current document. The measure depends on the ServerTextControl.PageUnit property. The default measure is 1/100th inch. The property value is an object of the type PageMargins. For more information see the description of the PageMargins class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ServerTextControl.PageMargins Property
- **448 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pagemargins-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pagemargins-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pagemargins-property/llms-full.txt

---

### Description

Gets or sets the margins for the pages of the current document. The measure depends on the [ServerTextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pageunit-property/llms-full.txt) property. The default measure is 1/100th inch. The property value is an object of the type [PageMargins](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagemargins/llms-full.txt). For more information see the description of the PageMargins class.

### Syntax

```csharp
public PageMargins PageMargins { get; set; }
```

```vbnet
Public Property PageMargins As PageMargins
```

### Examples

The following example uses `ServerTextControl.PageMargins` to apply the required margins to exported pages. The configured value is checked before the workflow continues.

```csharp
textControl.PageMargins = new PageMargins();
if (textControl.PageMargins != null)
{
    Console.WriteLine("Server Text Control: Page Margins is available.");
}
```

```vbnet
textControl.PageMargins = New PageMargins()
If textControl.PageMargins IsNot Nothing Then
    Console.WriteLine("Server Text Control: Page Margins is available.")
End If
```

---

## Nearby

- **Previous:** [ServerTextControl.OnXmlNotWellFormed Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/onxmlnotwellformed-method/llms-full.txt)
- **Next:** [ServerTextControl.Pages Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pages-property/llms-full.txt)
