# Javascript: TXTextControl.PageContent Enumeration

> Defines the contents of a page's image returned from the Page.getImage method.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Enumeration
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.PageContent Enumeration
- **415 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/pagecontent-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/pagecontent-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/pagecontent-enumeration/llms-full.txt

---

### Description

Defines the contents of a page's image returned from the [Page.getImage](https://docs.textcontrol.com/ds-server/reference/javascript/page/getimage-method/llms-full.txt) method.

### Members

| Member | Description |
|---|---|
| Background | The image contains the background of the page. |
| HeadersAndFooters | The image contains the header and the footer of the page. |
| MainText | The image contains the page's text contents. |
| All | The image contains all parts without the screen elements. |
| ScreenElements | The image contains all elements which are additionally displayed on a screen, such as the selection, the control characters and helper lines. |

### Examples

The following example uses `TXTextControl.PageContent.Background` (the image contains the background of the page.) in a document-editing workflow.

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

function applyPageContent(page) {
    page.getImage(
        TXTextControl.ImageFormat.Bmp,
        100,
        TXTextControl.PageContent.Background,
        function(result) {
            console.log("get image result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.NumberFormat Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/numberformat-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.pageMargins Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/pagemargins-property/llms-full.txt)
