---
title: "setPrintArea | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/design-editor-commands/set-print-area/"
---

# setPrintArea

> This is an equivalent of the [setPrintAreas](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/classes/ObjectModel.Surface.md#setprintareas) method from the IFrame API, but only for one surface (either a specified surface or the current surface).

## Params

- `data` - the same print area definition as used in the [setPrintAreas](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/classes/ObjectModel.Surface.md#setprintareas).
- `surfaceIndex` - which surface to replace. If omitted, the currently visible surface is modified.
- `options` - additional configuration settings. See the [ISetPrintAreasOptions](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISetPrintAreasOptions.md) for more details.

For the complete list of parameters, you can refer to [IDesignEditorDefinitionSetPrintArea](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-design-editor.IAuWidgetDesignEditor.md#idesigneditordefinitionsetprintarea).

## Example

```json
{
    "type": "design-editor",
    "name": "design-editor",
    "params": {
        "initial": { ... },
        "setPrintArea": [{
            "surfaceIndex": 1,
            "data": {
                "designFile": "{{'demos/cards/'+$['designs']._.title}}"
            },
            "options": {
                "preserveUserChanges": true,
                "updateRevertData": true,
                "updateSurfaceSize": true
            }
        }]
    }
}
```
