
# Class: SetPrintAreaCommand

A command that sets up a print area.
A command that sets up a print area.

For details, you can refer to the [ICanvasDefinitionSetPrintArea](../interfaces/icanvasdefinitionsetprintarea.md).
```
{
  "type": "canvas",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setPrintArea": {
      "options": {
        "preserveUserChanges": true,
        "updateRevertData": false
      },
      "data": {
        "designFile": "{{vars.designRoot + '/' + $['card-size']._.title}}"
      }
    }
  }
}
```

For details, you can refer to the [IDesignEditorDefinitionSetPrintArea](../interfaces/idesigneditordefinitionsetprintarea.md).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setPrintArea": {
      "options": {
        "preserveUserChanges": true,
        "updateRevertData": false
      },
      "data": {
        "designFile": "{{vars.designRoot + '/' + $['card-size']._.title}}"
      }
    }
  }
}
```

## Hierarchy

* [CanvasWidgetCommand](canvaswidgetcommand.md)

* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)

  ↳ **SetPrintAreaCommand**

## Index

### Methods

* [execute](setprintareacommand.md#execute)

## Methods

###  execute

▸ **execute**(`params`: [ICanvasDefinitionSetPrintArea](../interfaces/icanvasdefinitionsetprintarea.md)[] | [ICanvasDefinitionSetPrintArea](../interfaces/icanvasdefinitionsetprintarea.md)): *Promise‹void›*

*Overrides [CanvasWidgetCommand](canvaswidgetcommand.md).[execute](canvaswidgetcommand.md#abstract-execute)*

Executes this command.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`params` | [ICanvasDefinitionSetPrintArea](../interfaces/icanvasdefinitionsetprintarea.md)[] &#124; [ICanvasDefinitionSetPrintArea](../interfaces/icanvasdefinitionsetprintarea.md) | Parameters for the command.  |

**Returns:** *Promise‹void›*
