This is an old documentation. Go to the latest Customer's Canvas docs

ISurfacesFromFolder Interface

A structure holding settings to create a set of template-based surfaces. This interface uses PSD templates that are grouped by folders. For details, see the Multipage Products topic.

const productDefinition = {
    surfaces: {
        // Get surfaces from the folder.
        designFolder: "myphotoBook",
        // Name surfaces as "Page 1", "Page 2", and so on.
        name: "Page {0}",
        // Get mockups from the folder.
        mockupFolder: { up: "photoBookMockups" }
    // Define safety lines for all surfaces (product pages).
    defaultSafetyLines: [{
        margin: 5,
        color: "rgba(0,0,0,1)"


Optional bgFoldingMode

bgFoldingMode: IBgFoldingModeParams

Parameters of the background folding mode.

Optional designFolder

designFolder: string

A name of the folder containing PSD page templates of the multipage product.

Optional foldingLines

foldingLines: IFoldingLine []

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

Optional mockupFolder

mockupFolder: IMockupFolders

A name of the folder containing mockup files.

Optional name

name: string

Allows you to use a name mask for product surfaces. This string must contain the {0} placeholder, which 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.

Optional names

names: string []

An array of surface names. The number of array elements must match the number of surfaces. Otherwise, the default page captions appear in the Bottom toolbar.

Optional previewMockupFolder

previewMockupFolder: string | IMockupFolders

A name of the folder containing preview mockup files.

Optional proofImage

proofImage: IProofImage

Settings of proof images.

Optional spines

spines: ISpine []

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