# Javascript: SectionFormat.setRestartPageNumbering Method

> Sets a value indicating whether page numbering is restarted at the section's beginning.

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

---

### Description

Sets a value indicating whether page numbering is restarted at the section's beginning.

### Syntax

```javascript
<void> SectionFormat.setRestartPageNumbering(<boolean> restartPageNumbering, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| restartPageNumbering | Indicates whether page numbering is restarted at the section's beginning. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `SectionFormat.setRestartPageNumbering` in a practical document-editing workflow. It sets a value indicating whether page numbering is restarted at the section's beginning.

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

function configureRestartPageNumbering(sectionFormat) {
    sectionFormat.setRestartPageNumbering(
        true,
        function() {
            console.log("set restart page numbering completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: SectionFormat.setLandscape Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/sectionformat/setlandscape-method/llms-full.txt)
- **Next:** [Selection Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/llms-full.txt)
