# HeaderFooterSettings.alignWithMargins Property

> HeaderFooterSettings.alignWithMargins property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > HeaderFooterSettings > HeaderFooterSettings.alignWithMargins Property
- **442 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/alignwithmargins-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/alignwithmargins-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/alignwithmargins-property/llms-full.txt

---

The alignWithMargins value of HeaderFooterSettings.

Owner: [HeaderFooterSettings](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

### Syntax

```typescript
alignWithMargins: boolean
```

Read through the owning object: `owner.alignWithMargins`. Follow the declared mutability and owning object lifetime.

### Examples

Configure HeaderFooterSettings for an invoice or sales-report workflow. Supply font and document resources from the application where the example accepts them as inputs.

```typescript
import type { HeaderFooterSettings } from '@txtextcontrol/tx-sheet-control';

const headerFooterSettings: HeaderFooterSettings = {
    oddHeader: 'Invoice',
    oddFooter: 'Invoice',
    evenHeader: 'Invoice',
    evenFooter: 'Invoice',
    firstHeader: 'Invoice',
    firstFooter: 'Invoice',
    differentFirst: false,
    differentOddEven: false,
    scaleWithDocument: false,
    alignWithMargins: false,
};

console.log(headerFooterSettings['alignWithMargins']);
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [HeaderFooterSettings Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## Nearby

- **Previous:** [HeaderFooterSettings Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/llms-full.txt)
- **Next:** [HeaderFooterSettings.differentFirst Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/headerfootersettings/differentfirst-property/llms-full.txt)
