# Javascript: SectionFormat.setLandscape Method

> Sets a value indicating whether the section's page size is in landscape orientation.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: SectionFormat.setLandscape Method
- **383 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sectionformat/setlandscape-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sectionformat/setlandscape-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sectionformat/setlandscape-method/llms-full.txt

---

### Description

Sets a value indicating whether the section's page size is in landscape orientation.

### Syntax

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

### Parameters

| Parameter | Description |
|---|---|
| landscape | Indicates whether the section's page size is in landscape orientation. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `SectionFormat.setLandscape` in a practical document-editing workflow. It sets a value indicating whether the section's page size is in landscape orientation.

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

function configureLandscape(sectionFormat) {
    sectionFormat.setLandscape(
        true,
        function() {
            console.log("set landscape completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: SectionFormat.setEqualColumnWidth Method](https://docs.textcontrol.com/ds-server/reference/javascript/sectionformat/setequalcolumnwidth-method/llms-full.txt)
- **Next:** [Javascript: SectionFormat.setRestartPageNumbering Method](https://docs.textcontrol.com/ds-server/reference/javascript/sectionformat/setrestartpagenumbering-method/llms-full.txt)
