# Javascript: PageBorder.setBottomDistance Method

> Sets the distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the MeasureFromText.

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

---

### Description

Sets the distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the MeasureFromText.

### Syntax

```javascript
<void> PageBorder.setBottomDistance(<number> bottomDistance, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| bottomDistance | The distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the MeasureFromText property. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `PageBorder.setBottomDistance` in a practical document-editing workflow. It sets the distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the MeasureFromText.

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

function configureBottomDistance(pageBorder) {
    pageBorder.setBottomDistance(
        1440,
        function() {
            console.log("set bottom distance completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: PageBorder.getTopLineWidth Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettoplinewidth-method/llms-full.txt)
- **Next:** [Javascript: PageBorder.setBottomLineColor Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/setbottomlinecolor-method/llms-full.txt)
