---
title: "setPrintAreas Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.surface.setprintareas.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# setPrintAreas Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- setPrintAreas(printAreas:  ( [IPrintAreaTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareatemplate.htm.md)  |  [IPrintAreaDefinition](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareadefinition.htm.md) ) [], options?:  [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md) ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Sets a new print area for the surface and returns a new product instance containing the changed surface.
  
    By default, **setPrintAreas** moves only texts and image placeholders to new positions and drops other design elements. Note that this method changes the content of placeholders having the same layer names on the current [Surface](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.surface.htm.md) and in the new layout. To maintain the rest elements, set the **replaceAll** option 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.
 
    If the current print area and the new print area have different sizes, you can specify whether to update the surface size to match the new print area by using the **updateSurfaceSize** option.
 
 - example
     - ```
    var newPrintAreas = [{ designFile: "stamp" }];
    var options = { 
        replaceAll: true,
        preserveSafetyLines: false,
        updateSurfaceSize: true
    };
    editor.getProduct()
        .then(function (product) {
            return product.surfaces[0].setPrintAreas(newPrintAreas, options);
        })
        .then(function (product) {
            console.log("The print area was successfully set for the product " + product.id);
        })
        .catch(function (error) {
            console.error("Failed to set up the print area: ", error);
        });
    ```

#### Parameters

    - ##### printAreas: ( [IPrintAreaTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareatemplate.htm.md)  |  [IPrintAreaDefinition](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareadefinition.htm.md) ) [] 
  
        Print areas to set.
    - #####  Optional options: [ISetPrintAreasOptions](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isetprintareasoptions.htm.md) 
  
        Additional configuration settings for the print areas.

#### Returns Promise &lt; Product &gt;
 
    A new product instance containing the changed surface.
