
# 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 [IDesignEditorDefinitionSetPrintArea](../interfaces/idesigneditordefinitionsetprintarea.md).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setPrintArea": {
      "options": {
        "preserveUserChanges": true,
        "updateRevertData": false
      },
      "data": {
        "designFile": "{{vars.designRoot + '/' + $['card-size']._.title}}"
      }
    }
  }
}
```

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}}"
      }
    }
  }
}
```

## Hierarchy

* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)

* [CanvasWidgetCommand](canvaswidgetcommand.md)

  ↳ **SetPrintAreaCommand**

## Index

### Methods

* [execute](setprintareacommand.md#execute)

## Methods

###  execute

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

*Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)*

Executes this command.

**Parameters:**

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

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