# createDocumentLayout Function

> createDocumentLayout function in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > createDocumentLayout Function
- **495 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/createdocumentlayout-function/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/createdocumentlayout-function/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/createdocumentlayout-function/llms-full.txt

---

Public function for createDocumentLayout.

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

ES module import: `import { createDocumentLayout } from '@txtextcontrol/tx-sheet-control';`.

### Syntax

```typescript
createDocumentLayout(workbook: WorkbookInstance, options: WorkbookPdfOptions): { version: 1; plan: any; pages: any; renderPage: (number: number) => PageScene; [Symbol.iterator](): Generator<PageScene, void, unknown>; }
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `workbook` | `WorkbookInstance` | No | Value matching workbook's declared type and the owning object's validation rules. |
| `options` | `WorkbookPdfOptions` | No | Supported settings for this operation; omitted settings retain documented defaults. |

### Return Value

`{ version: 1; plan: any; pages: any; renderPage: (number: number) => PageScene; [Symbol.iterator](): Generator<PageScene, void, unknown>; }`.

### Examples

Use this public value with the application package shown below. File and font inputs are application-owned resources, not automatically downloaded product data.

```typescript
import { createDocumentLayout } from '@txtextcontrol/tx-sheet-control';
import type { Workbook, FontRegistry } from '@txtextcontrol/tx-sheet-control';

function useCreateDocumentLayout(workbook: Workbook, fonts: FontRegistry) {
    const result = createDocumentLayout(workbook, { fonts: fonts });
    console.log(result);
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Loading and Saving Workbooks](https://docs.textcontrol.com/tx-sheet-control/document-processing/load-save/llms-full.txt)

---

## Nearby

- **Previous:** [Coordinates.row Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/coordinates/row-property/llms-full.txt)
- **Next:** [createHttpDataProvider Function](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/createhttpdataprovider-function/llms-full.txt)
