# Javascript: TextFrame.getDescriptiveText Method

> Gets the descriptive text for the text frame. An empty string indicates that the text frame has no such text.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 34.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TextFrame.getDescriptiveText Method
- **349 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textframe/getdescriptivetext-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textframe/getdescriptivetext-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textframe/getdescriptivetext-method/llms-full.txt

---

### Description

Gets the descriptive text for the text frame. An empty string indicates that the text frame has no such text.

### Syntax

```javascript
<void> TextFrame.getDescriptiveText(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the current property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextFrame.getDescriptiveText` in a practical document-editing workflow. It gets the descriptive text for the text frame. An empty string indicates that the text frame has no such text.

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

function inspectDescriptiveText(textFrame) {
    textFrame.getDescriptiveText(
        function(result) {
            console.log("get descriptive text result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextFrame.getBounds Method](https://docs.textcontrol.com/ds-server/reference/javascript/textframe/getbounds-method/llms-full.txt)
- **Next:** [Javascript: TextFrame.getID Method](https://docs.textcontrol.com/ds-server/reference/javascript/textframe/getid-method/llms-full.txt)
