# Export canvas as image (with settings)

- Page: https://jiguang132.com/resources/tldraw/docs/export-canvas-settings
- Resource: tldraw (https://jiguang132.com/resources/tldraw.md)
- All guides: https://jiguang132.com/resources/tldraw/docs.md

Try each TLImageExportOptions setting (background, dark mode, padding, scale, bounds) when exporting with editor.toImage.

## Official example

The preview embeds the official tldraw examples site. tldraw hosts it and updates it from its main branch; JGuang does not copy the example source or the SDK.

- Open on the examples site: https://examples.tldraw.com/export-canvas-settings/full
- Example source (GitHub): https://github.com/tldraw/tldraw/tree/main/apps/examples/src/examples/data/assets/export-canvas-settings
- Category: Data & assets

## Use it in a project

```bash
npm install tldraw@5.5.2
```

The examples site runs main-branch code, so some APIs may be newer than the stable npm release. Check APIs against your installed version before adapting an example. Import `tldraw/tldraw.css` and give the editor container an explicit size.

## License

The tldraw SDK uses the tldraw license: development use is free, and production deployments need a valid license key (trial, commercial or hobby).

- Licensing details: https://tldraw.dev/community/license

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
