Skip to main content

Interface: IProductDefinition

A structure holding settings to create a product.

Example

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)"
}]`,
};

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

IModelComponent.name


defaultSafetyLines?

optional defaultSafetyLines?: ISafetyLine[]

A collection of safety lines defined for every surface (page) in the product.


defaultDesignLocation?

optional defaultDesignLocation?: IPointF

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


defaultCropMarks?

optional defaultCropMarks?: ICropMark[]

A collection of default crop marks defined for every surface (page) in the product.


surfaces

surfaces: SurfaceTypes[] | ISurfacesFromFolder | ISurfacesFromMultipageTemplate

A collection of surfaces (pages) defined in the product.

Was this page helpful?