Skip to main content
⚠️ Archived Version

You are viewing documentation for Design Editor version 7.3, which is no longer actively maintained. For the latest features and updates, please refer to the current version (7.4).

Interface: ISurfaceFromState

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

Example​

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​

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.name


foldingLines?​

optional foldingLines?: IFoldingLine[]

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

Inherited from​

ISurfaceTemplate.foldingLines


spines?​

optional spines?: ISpine[]

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

Inherited from​

ISurfaceTemplate.spines


bgFoldingMode?​

optional bgFoldingMode?: IBgFoldingModeParams

Parameters of the background folding mode.

Inherited from​

ISurfaceTemplate.bgFoldingMode


proofImage?​

optional proofImage?: IProofImage

Settings of proof images.

Inherited from​

ISurfaceTemplate.proofImage


mockup?​

optional mockup?: IMockupTemplate

A mockup applied to the surface.

Inherited from​

ISurfaceTemplate.mockup


previewMockups?​

optional previewMockups?: IMockupTemplate[]

A collection of preview mockups for proof images.

Inherited from​

ISurfaceTemplate.previewMockups


printAreas?​

optional printAreas?: (IPrintAreaTemplate | IPrintAreaDefinition)[]

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

Inherited from​

ISurfaceTemplate.printAreas


containers?​

optional containers?: IChannelContainerDefinition[]

A collection of channel containers. For more details, refer to the Post Press Finishing topic.

Inherited from​

ISurfaceTemplate.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.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.

Was this page helpful?