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?
optionalname?: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
foldingLines?
optionalfoldingLines?:IFoldingLine[]
A collection of folding lines defined in the surface (page).
Inherited from
spines?
optionalspines?:ISpine[]
A collection of spines defined in the surface (page).
Inherited from
bgFoldingMode?
optionalbgFoldingMode?:IBgFoldingModeParams
Parameters of the background folding mode.
Inherited from
ISurfaceTemplate.bgFoldingMode
proofImage?
optionalproofImage?:IProofImage
Settings of proof images.
Inherited from
mockup?
optionalmockup?:IMockupTemplate
A mockup applied to the surface.
Inherited from
previewMockups?
optionalpreviewMockups?:IMockupTemplate[]
A collection of preview mockups for proof images.
Inherited from
ISurfaceTemplate.previewMockups
printAreas?
optionalprintAreas?: (IPrintAreaTemplate|IPrintAreaDefinition)[]
A collection of print areas defined in the surface (page).
Inherited from
containers?
optionalcontainers?:IChannelContainerDefinition[]
A collection of channel containers. For more details, refer to the Post Press Finishing topic.
Inherited from
useSpecifiedContainersOnly?
optionaluseSpecifiedContainersOnly?: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?
optionalsurface?:number
A surface index in the state file. The default value is 0 that stands for the first surface.
location?
optionallocation?:PointF
Coordinates of the design relative to the upper-left corner of the mockup, in points.