# PageHeight Property

> Sets or returns the page height of the document or a section in twips, at most 32767; returns -1 when the sections selected through SectionCurrent differ.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > PageHeight Property
- **323 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-property/llms-full.txt

---

Returns or sets the height of the page for the whole document or for a document's section. The [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property determines the part of the document. The property returns -1, if more than one section is specified through the [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property and these sections' pages have a different height.

### Syntax

```vbscript
TXTextControl.PageHeight [= value]
```

### Data Types

Long.

### Examples

See [PrintPage](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printpage-method/llms-full.txt) method example.

### Remarks

The height of the actual printed area is PageHeight minus [PageMarginB](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginb-property/llms-full.txt) minus [PageMarginT](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemargint-property/llms-full.txt). The maximum value depends on the capabilities of the selected printer and must not exceed 32767 [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips).

### See Also

- [PageWidth Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagewidth-property/llms-full.txt)
- [PageMarginx Properties](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginb-property/llms-full.txt)
- [PrintDevice Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printdevice-property/llms-full.txt)
- [PrintPage Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printpage-method/llms-full.txt)
- [Programming Category: Sections and Pages](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/sections-pages/llms-full.txt)

---

## Nearby

- **Previous:** [PageFormatChange Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageformatchange-event/llms-full.txt)
- **Next:** [PageImage Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageimage-property/llms-full.txt)
