---
title: "Interface: ISurfaceFromState | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceFromState/"
---

# Interface: ISurfaceFromState

> A structure holding settings to create a surface from a state file.

## Example

``` js
const productDefinition = {
   surfaces: [{
       // Initialize a surface through a state file.
       stateId: "ed867273-5679-4927-b718-a53e92d6802c",
       // Select a surface index in the state file.
       surface: 2,
       // Apply a background mockup to the surface.
       mockup: {
           down: "tshirt"
       },
       // Specify the design location relative to the mockup.
       location: { x: 120, y: 0 }
   }]
};
```

## Extends

- [`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md)

## Properties

### name?

> `optional` **name?**: `string`

A name of a surface (a page) in the product.

#### Remarks

In multipage products, it allows you to use a name mask for product surfaces. If this string contains the `{0}` placeholder, it will be replaced with a page number, starting from `1`. For example, `name: "Page {0}"` specifies the following page captions in the Bottom toolbar: `Page 1`, `Page 2`, and so on.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`name`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#name)

***

### foldingLines?

> `optional` **foldingLines?**: [`IFoldingLine`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IFoldingLine.md)[]

A collection of folding lines defined in the surface (page).

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`foldingLines`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#foldinglines)

***

### spines?

> `optional` **spines?**: [`ISpine`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISpine.md)[]

A collection of spines defined in the surface (page).

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`spines`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#spines)

***

### bgFoldingMode?

> `optional` **bgFoldingMode?**: [`IBgFoldingModeParams`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IBgFoldingModeParams.md)

Parameters of the background folding mode.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`bgFoldingMode`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#bgfoldingmode)

***

### proofImage?

> `optional` **proofImage?**: [`IProofImage`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IProofImage.md)

Settings of proof images.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`proofImage`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#proofimage)

***

### mockup?

> `optional` **mockup?**: [`IMockupTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IMockupTemplate.md)

A mockup applied to the surface.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`mockup`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#mockup)

***

### previewMockups?

> `optional` **previewMockups?**: [`IMockupTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IMockupTemplate.md)[]

A collection of preview mockups for proof images.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`previewMockups`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#previewmockups)

***

### printAreas?

> `optional` **printAreas?**: ([`IPrintAreaTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IPrintAreaTemplate.md) \| [`IPrintAreaDefinition`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IPrintAreaDefinition.md))[]

A collection of print areas defined in the surface (page).

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`printAreas`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#printareas)

***

### containers?

> `optional` **containers?**: [`IChannelContainerDefinition`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.IChannelContainerDefinition.md)[]

A collection of channel containers. For more details, refer to the [Post Press Finishing](https://customerscanvas.com/dev/editors/iframe-api/product-definition/post-press-finishing-layers.html) topic.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`containers`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#containers)

***

### useSpecifiedContainersOnly?

> `optional` **useSpecifiedContainersOnly?**: `boolean`

If `true`, only spot containers defined in IDML or PSD templates will be created in a product, without the default containers Main, Background, and Foreground. The default value is `false`.

#### Inherited from

[`ISurfaceTemplate`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md).[`useSpecifiedContainersOnly`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/ObjectModel.ISurfaceTemplate.md#usespecifiedcontainersonly)

***

### stateId

> **stateId**: `string`

The name of a state file.

***

### surface?

> `optional` **surface?**: `number`

A surface index in the state file. The default value is `0` that stands for the first surface.

***

### location?

> `optional` **location?**: `PointF`

Coordinates of the design relative to the upper-left corner of the mockup, in points.
