# createDocumentLayout Function

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

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > createDocumentLayout Function
- **391 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/createdocumentlayout-function/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/createdocumentlayout-function/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-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

```javascript
createDocumentLayout(workbook, options)
```

### 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.

```javascript
import { createDocumentLayout } from '@txtextcontrol/tx-sheet-control';

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

### See Also

- [JavaScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-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:** [columnName Function](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/columnname-function/llms-full.txt)
- **Next:** [createHttpDataProvider Function](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/createhttpdataprovider-function/llms-full.txt)
