# Javascript: TXTextControl.ViewMode Enumeration

> The mode how Text Control displays a document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.ViewMode Enumeration
- **319 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/viewmode-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/viewmode-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/viewmode-enumeration/llms-full.txt

---

### Description

The mode how Text Control displays a document.

### Members

| Member | Description |
|---|---|
| PageView | Text is formatted like in Normal view mode, and additionally the Text Control displays the pages in 3D view with gaps and a desktop background. Headers and footers are displayed in WYSIWYG mode. |
| Normal | Text is formatted according to the settings of the PageSize and the PageMargins properties. Headers and footers can be inserted but they are not displayed. |

### Examples

The following example uses `TXTextControl.ViewMode.PageView` (text is formatted like in Normal view mode, and additionally the Text Control displays the pages in 3D view with gaps and a desktop background. Headers and footers are displayed in WYSIWYG mode.) in a document-editing workflow.

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

TXTextControl.setViewMode(
    TXTextControl.ViewMode.PageView,
    function() {
        console.log("set view mode completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.verticalRulerBar Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/verticalrulerbar-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.zoom Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/zoom-method/llms-full.txt)
