# PageMargins Constructor

> Creates a new instance of the PageMargins class.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Constructor
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > PageMargins Constructor
- **755 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/constructor/llms-full.txt

---

### Description

Creates a new instance of the [PageMargins](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/llms-full.txt) class.

### Syntax

#### PageMargins()

Creates a new instance of the [PageMargins](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/llms-full.txt) class with a left, top, right and bottom margin of 1 inch.

```csharp
public PageMargins();
```

```vbnet
Public Sub New()
```

#### PageMargins(double, double, double, double)

Creates a new instance of the [PageMargins](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/llms-full.txt) class with the specified margins.

```csharp
public PageMargins(double left, double top, double right, double bottom);
```

```vbnet
Public Sub New(left As Double, top As Double, right As Double, bottom As Double)
```

| Parameter | Description |
|---|---|
| left | Specifies the left page margin. |
| top | Specifies the top page margin. |
| right | Specifies the right page margin. |
| bottom | Specifies the bottom page margin. |

#### PageMargins(SerializationInfo, StreamingContext)

```csharp
protected PageMargins(SerializationInfo info, StreamingContext context);
```

```vbnet
Protected Sub New(info As SerializationInfo, context As StreamingContext)
```

### Examples

The following example creates a Page Margins instance and configures its left setting for a document workflow.

```csharp
PageMargins pageMargins = new();
pageMargins.Left = 1.0;
```

```vbnet
Dim pageMargins As New PageMargins()
pageMargins.Left = 1.0
```

---

## Nearby

- **Previous:** [PageMargins.Bottom Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/bottom-property/llms-full.txt)
- **Next:** [PageMargins.Left Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/left-property/llms-full.txt)
