# Javascript: ParagraphFormat.getWidowOrphanLines Method

> Gets the number of lines for widow/orphan control.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: ParagraphFormat.getWidowOrphanLines Method
- **306 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getwidoworphanlines-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getwidoworphanlines-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getwidoworphanlines-method/llms-full.txt

---

### Description

Gets the number of lines for widow/orphan control.

### Syntax

```javascript
<void> ParagraphFormat.getWidowOrphanLines(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the number of lines for widow/orphan control. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphFormat.getWidowOrphanLines` in a practical document-editing workflow. It gets the number of lines for widow/orphan control.

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

TXTextControl.paragraphFormat.getWidowOrphanLines(
    function(result) {
        console.log("get widow orphan lines result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: ParagraphFormat.getTopDistance Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/gettopdistance-method/llms-full.txt)
- **Next:** [Javascript: ParagraphFormat.setAbsoluteLineSpacing Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/setabsolutelinespacing-method/llms-full.txt)
