# Javascript: TXTextControl.setLandscape Method

> Sets 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.setLandscape Method
- **339 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setlandscape-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setlandscape-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setlandscape-method/llms-full.txt

---

### Description

Sets a value indicating whether the page orientation is landscape.

### Syntax

```javascript
<void> TXTextControl.setLandscape(<boolean> isLandscape, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

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

### Examples

The following example demonstrates `TXTextControl.setLandscape` in a practical document-editing workflow. It sets 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.setLandscape(
    true,
    function() {
        console.log("set landscape completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.setIsTrackChangesEnabled Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setistrackchangesenabled-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.setPageUnit Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setpageunit-method/llms-full.txt)
