# Javascript: TableOfContents.getHasRightAlignedPageNumbers Method

> Gets a value specifying whether the page numbers in the table of contents are right-aligned.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TableOfContents.getHasRightAlignedPageNumbers Method
- **418 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/tableofcontents/gethasrightalignedpagenumbers-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/tableofcontents/gethasrightalignedpagenumbers-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/tableofcontents/gethasrightalignedpagenumbers-method/llms-full.txt

---

### Description

Gets a value specifying whether the page numbers in the table of contents are right-aligned.

### Syntax

```javascript
<void> TableOfContents.getHasRightAlignedPageNumbers(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TableOfContents.getHasRightAlignedPageNumbers` in a practical document-editing workflow. It gets a value specifying whether the page numbers in the table of contents are right-aligned.

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

function inspectHasRightAlignedPageNumbers(tableOfContents) {
    tableOfContents.getHasRightAlignedPageNumbers(
        function(result) {
            if (result) {
                console.log("get has right aligned page numbers is available.");
            } else {
                console.warn("get has right aligned page numbers is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TableOfContents.getHasPageNumbers Method](https://docs.textcontrol.com/ds-server/reference/javascript/tableofcontents/gethaspagenumbers-method/llms-full.txt)
- **Next:** [Javascript: TableOfContents.getHighlightColor Method](https://docs.textcontrol.com/ds-server/reference/javascript/tableofcontents/gethighlightcolor-method/llms-full.txt)
