# PageSize Object

> Represents the page's size of a TX Text Control document or document section. The measure depends on the page's unit.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 26.0
- **Path:** DS Server > Reference > JavaScript API > PageSize Object
- **455 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/llms-full.txt

---

### Description

Represents the page's size of a TX Text Control document or document section. The measure depends on the [page's unit](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getpageunit-method/llms-full.txt).

### Syntax

```javascript
PageSize
```

### Examples

The following example demonstrates `PageSize` in a practical document-editing workflow. It represents the page's size of a TX Text Control document or document section. The measure depends on the page's unit.

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

TXTextControl.pageSize.getHeight(
    function(result) {
        console.log("get height result:", result);
    },
    onTxError
);
```

---

## In This Section

- [Javascript: PageSize.Attribute Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/attribute-enumeration/llms-full.txt): Determines a certain page size attribute.
- [Javascript: PageSize.getHeight Method](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/getheight-method/llms-full.txt): Gets the page height of a document or document section.
- [Javascript: PageSize.getWidth Method](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/getwidth-method/llms-full.txt): Gets the page width of a document or document section.
- [Javascript: PageSize.setHeight Method](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/setheight-method/llms-full.txt): Sets the page height of a document or document section.
- [Javascript: PageSize.setWidth Method](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/setwidth-method/llms-full.txt): Sets the page width of a document or document section.

---

## Nearby

- **Previous:** [Javascript: PageNumberFieldCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/pagenumberfieldcollection/remove-method/llms-full.txt)
- **Next:** [Javascript: PageSize.Attribute Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/pagesize/attribute-enumeration/llms-full.txt)
