# Javascript: TXTextControl.getLandscape Method

> Gets a value indicating whether the page orientation is landscape.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getLandscape Method
- **357 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getlandscape-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getlandscape-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getlandscape-method/llms-full.txt

---

### Description

Gets a value indicating whether the page orientation is landscape.

### Syntax

```javascript
<void> TXTextControl.getLandscape(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives whether the page orientation is landscape. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.getLandscape` in a practical document-editing workflow. It gets a value indicating whether the page orientation is landscape.

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

TXTextControl.getLandscape(
    function(result) {
        if (result) {
            console.log("get landscape is available.");
        } else {
            console.warn("get landscape is not available in the current document state.");
        }
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getIsTrackChangesEnabled Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getistrackchangesenabled-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getPageCount Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getpagecount-method/llms-full.txt)
