# PageSetup Interface

> PageSetup interface in the TX Sheet Control TypeScript API for Node.js, with its syntax, 18 properties and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > PageSetup Interface
- **1120 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/llms-full.txt

---

Normalized sheet print/view settings; custom paper dimensions use millimeters and margins use inches.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Members

#### Properties

| Property | Description |
|---|---|
| [columnBreaks](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/columnbreaks-property/llms-full.txt) | The columnBreaks value of PageSetup. |
| [fitToHeight](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittoheight-property/llms-full.txt) | The fitToHeight value of PageSetup. |
| [fitToPage](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittopage-property/llms-full.txt) | The fitToPage value of PageSetup. |
| [fitToWidth](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittowidth-property/llms-full.txt) | The fitToWidth value of PageSetup. |
| [headerFooter](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/headerfooter-property/llms-full.txt) | The headerFooter value of PageSetup. |
| [margins](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/margins-property/llms-full.txt) | The margins value of PageSetup. |
| [orientation](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/orientation-property/llms-full.txt) | The orientation value of PageSetup. |
| [pageOrder](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/pageorder-property/llms-full.txt) | The pageOrder value of PageSetup. |
| [paperHeight](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/paperheight-property/llms-full.txt) | The paperHeight value of PageSetup. |
| [paperSize](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/papersize-property/llms-full.txt) | The paperSize value of PageSetup. |
| [paperWidth](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/paperwidth-property/llms-full.txt) | The paperWidth value of PageSetup. |
| [printArea](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printarea-property/llms-full.txt) | The printArea value of PageSetup. |
| [printGridlines](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printgridlines-property/llms-full.txt) | The printGridlines value of PageSetup. |
| [printHeadings](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printheadings-property/llms-full.txt) | The printHeadings value of PageSetup. |
| [rowBreaks](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/rowbreaks-property/llms-full.txt) | The rowBreaks value of PageSetup. |
| [scale](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/scale-property/llms-full.txt) | The scale value of PageSetup. |
| [showGridlines](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/showgridlines-property/llms-full.txt) | The showGridlines value of PageSetup. |
| [showHeadings](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/showheadings-property/llms-full.txt) | The showHeadings value of PageSetup. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

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

function createPageSetupReport(
    control: ServerSheetControl,
    settings: Awaited<ReturnType<ServerSheetControl['workbook']['sheets']['get']>>['print']['settings'],
) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet
        .cell('A1')
        .format({
            fontFamily: 'Liberation Sans',
            fontSize: 16,
            bold: true,
            textColor: '#ffffff',
            fillColor: '#163b63',
        });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });
    sheet.print.configure({ ...settings });
    return sheet;
}
```

### See Also

- [TypeScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/llms-full.txt)
- [Exporting Worksheets to PDF](https://docs.textcontrol.com/tx-sheet-control/pdf/export/llms-full.txt)

---

## In This Section

- [PageSetup.columnBreaks Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/columnbreaks-property/llms-full.txt): PageSetup.columnBreaks property in the TX Sheet Control TypeScript API for Node.js, with its type number[] and a TypeScript example.
- [PageSetup.fitToHeight Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittoheight-property/llms-full.txt): PageSetup.fitToHeight property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [PageSetup.fitToPage Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittopage-property/llms-full.txt): PageSetup.fitToPage property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PageSetup.fitToWidth Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/fittowidth-property/llms-full.txt): PageSetup.fitToWidth property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [PageSetup.headerFooter Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/headerfooter-property/llms-full.txt): PageSetup.headerFooter property in the TX Sheet Control TypeScript API for Node.js, with its type HeaderFooterSettings and a TypeScript example.
- [PageSetup.margins Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/margins-property/llms-full.txt): PageSetup.margins property in the TX Sheet Control TypeScript API for Node.js, with its syntax and a TypeScript example.
- [PageSetup.orientation Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/orientation-property/llms-full.txt): PageSetup.orientation property in the TX Sheet Control TypeScript API for Node.js, with its type "portrait" | "landscape" and a TypeScript example.
- [PageSetup.pageOrder Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/pageorder-property/llms-full.txt): PageSetup.pageOrder property in the TX Sheet Control TypeScript API for Node.js, with its type "downThenOver" | "overThenDown" and a TypeScript example.
- [PageSetup.paperHeight Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/paperheight-property/llms-full.txt): PageSetup.paperHeight property in the TX Sheet Control TypeScript API for Node.js, with its type number | null and a TypeScript example.
- [PageSetup.paperSize Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/papersize-property/llms-full.txt): PageSetup.paperSize property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [PageSetup.paperWidth Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/paperwidth-property/llms-full.txt): PageSetup.paperWidth property in the TX Sheet Control TypeScript API for Node.js, with its type number | null and a TypeScript example.
- [PageSetup.printArea Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printarea-property/llms-full.txt): PageSetup.printArea property in the TX Sheet Control TypeScript API for Node.js, with its type string | null and a TypeScript example.
- [PageSetup.printGridlines Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printgridlines-property/llms-full.txt): PageSetup.printGridlines property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PageSetup.printHeadings Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/printheadings-property/llms-full.txt): PageSetup.printHeadings property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PageSetup.rowBreaks Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/rowbreaks-property/llms-full.txt): PageSetup.rowBreaks property in the TX Sheet Control TypeScript API for Node.js, with its type number[] and a TypeScript example.
- [PageSetup.scale Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/scale-property/llms-full.txt): PageSetup.scale property in the TX Sheet Control TypeScript API for Node.js, with its syntax, its type number and a TypeScript example.
- [PageSetup.showGridlines Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/showgridlines-property/llms-full.txt): PageSetup.showGridlines property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PageSetup.showHeadings Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/showheadings-property/llms-full.txt): PageSetup.showHeadings property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.

---

## Nearby

- **Previous:** [PageScene.width Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagescene/width-property/llms-full.txt)
- **Next:** [PageSetup.columnBreaks Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pagesetup/columnbreaks-property/llms-full.txt)
