# Javascript: ParagraphStyle.getParagraphFormat Method

> Gets the style's paragraph attributes.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: ParagraphStyle.getParagraphFormat Method
- **388 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphstyle/getparagraphformat-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphstyle/getparagraphformat-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphstyle/getparagraphformat-method/llms-full.txt

---

### Description

Gets the style's paragraph attributes.

### Syntax

```javascript
<void> ParagraphStyle.getParagraphFormat(<RequestParagraphFormatCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the style's paragraph attributes. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphStyle.getParagraphFormat` in a practical document-editing workflow. It gets the style's paragraph attributes.

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

function inspectParagraphFormat(paragraphStyle) {
    paragraphStyle.getParagraphFormat(
        function(format) {
            if (!format) {
                console.warn("No paragraph format was returned.");
                return;
            }
            
            console.log("get paragraph format result:", format);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: ParagraphStyle.getFollowingStyle Method](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphstyle/getfollowingstyle-method/llms-full.txt)
- **Next:** [Javascript: ParagraphStyle.listFormat Property](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphstyle/listformat-property/llms-full.txt)
