# Javascript: TXTextControl.pages Property

> Gets a collection of all pages in the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.pages Property
- **200 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/pages-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/pages-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/pages-property/llms-full.txt

---

### Description

Gets a collection of all pages in the document.

### Syntax

```javascript
<PageCollection> TXTextControl.pages
```

### Examples

The following example demonstrates `TXTextControl.pages` in a practical document-editing workflow. It gets a collection of all pages in the document.

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

tXTextControl.pages.getCount(function(count) {
    console.log("pages count:", count);
}, onTxError);
```

### Limitations

Read Only.

---

## Nearby

- **Previous:** [Javascript: TXTextControl.pageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/pagemargins-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.pageSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/pagesize-property/llms-full.txt)
