# Javascript: PageMargins.getRight Method

> Gets the right margin of a TX Text Control document or document section.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: PageMargins.getRight Method
- **307 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pagemargins/getright-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pagemargins/getright-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pagemargins/getright-method/llms-full.txt

---

### Description

Gets the right margin of a TX Text Control document or document section.

### Syntax

```javascript
<void> PageMargins.getRight(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the right margin of a TX Text Control document or document section. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `PageMargins.getRight` in a practical document-editing workflow. It gets the right margin of a TX Text Control document or document section.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.pageMargins.getRight(
    function(result) {
        console.log("get right result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: PageMargins.getLeft Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pagemargins/getleft-method/llms-full.txt)
- **Next:** [Javascript: PageMargins.getTop Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pagemargins/gettop-method/llms-full.txt)
