- Introduction
- What's New?
- Features
- Getting Started
- Integration with E-commerce
- Integration with Remote Asset Sources
- Printable Files and Proof Images
- Configuring Products
- Creating Product Templates
- User Interface
- Configuration Files
- API
- Introduction to IFrame API
- IFrame API Reference
- BaseEditor Module
- IframeApi Module
- Configuration Module
- Editor Class
- loadEditor Function
- loadEditorByQueryString Function
- ObjectModel Module
- ChannelContainerType Enumeration
- Container Class
- CropMarkTextAlignment Enumeration
- IBarcodeVariable Interface
- IBasePrintAreaDefinition Interface
- IBaseSurfaceDefinition Interface
- IBaseSurfacesDefinition Interface
- IBgFoldingModeParams Interface
- IChannelContainerDefinition Interface
- ICropMark Interface
- ICropMarkText Interface
- IFoldingLine Interface
- IHiResOutput Interface
- IMarginHV Interface
- IMarginLTRB Interface
- IMockupData Interface
- IMockupFolders Interface
- IMockupTemplateHandlerLegacy Interface
- IMockupTemplateObject Interface
- IModelComponent Interface
- IPointF Interface
- IPrintAreaDefinition Interface
- IPrintAreaTemplate Interface
- IProductDefinition Interface
- IProofImage Interface
- IRectangleF Interface
- ISafetyLine Interface
- ISize Interface
- ISpine Interface
- IStateSurface Interface
- IStateSurfaces Interface
- ISurfaceDefinition Interface
- ISurfacesFromFolder Interface
- ISurfacesFromMultipageTemplate Interface
- ISurfaceTemplate Interface
- ITagsDictionary Interface
- Item Class
- IVariable Interface
- PrintArea Class
- Product Class
- Surface Class
- SurfaceMockup Class
- PostMessage Module
- preload Function
- RuntimeConfiguration Class
- Web API
- Old Query-string API
- Visual Proofing Tool
- Variable Data Printing
- System Requirements
- Troubleshooting
- Licensing
- Copyright Notices
setPrintAreas Method
Applies to: Customer's Canvas On-Premises; Design Editor 4.4.25, 4.x (may differ) · Archived documentation
Callable
-
Sets a new print area for the surface and returns a new product instance containing the changed surface.
As a result, setPrintAreas moves only texts and image placeholders to new positions and drops other design elements. By default, this method changes the content of placeholders having the same layer names on the current Surface and in the new layout. To maintain the rest elements, set replaceAll to
true. In this case, the rest of placeholders take content in a random order according to their type. If the old layout had more placeholders than the new layout, then extra placeholders are removed.Parameters
-
printAreas: ( IPrintAreaTemplate | IPrintAreaDefinition ) []
Print areas to set.
-
Optional options: object
Additional configuration settings for the print areas.
-
Optional preserve
Safety Lines: boolean If
true, then current safety lines, if any, are restored in new print areas. Iffalse, safety lines from new print areas are applied. The default value istrue. -
Optional preserve
User Changes: boolean If
true, then changes made by a user are restored in the new print areas if it is possible. Otherwise, all changes made by the user are wiped. The default value istrue. -
Optional replace
All: boolean If
true, design elements whose names do not match move to the new print area in a random order according to their types. Iffalse, only design elements with the same names are moved to the new print area. The default value isfalse. -
Optional update
Revert Data: boolean If
true, the new print areas are stored as ones to restore when the product is reverted. Otherwise, the previously stored print areas are restored on product revert. The default value istrue.
-
Returns Promise < Product >
A new product instance containing the changed surface.
-