---
title: "finishProductDesign Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.editor.finishproductdesign.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/).

# finishProductDesign Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- finishProductDesign(options?:  object, data?:  object ) :  Promise &lt; [IFinishDesignResult](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.editor.ifinishdesignresult.htm.md) &gt;

- Saves the current product state and returns links to the hi-res output. For details, see the [Introducing the IFrame API](https://customerscanvas.com/docs/cc6/handling-product-customization.htm.md) topic.
  
 - example
     - ```
    // Completing product customization.
    editor.finishProductDesign()
        // If product customization is completed successfully.
        .then(function (result) {
            // Get the promise properties.
            hiResOutputUrls = result.hiResOutputUrls;
            proofImageUrls = result.proofImageUrls;
            stateId = result.stateId;
            userId = result.userId;
            returnToEditUrl = result.returnToEditUrl;
            boundsData = result.boundsData;
            userChanges = result.userChanges;
            preflightProblems = result.violationWarningData;
            console.log("User " + userId + " successfully saved state " + stateId);
        })
        // If there was an error thrown when completing product customization.
        .catch(function (error) {
            console.error("Completing product customization failed with exception: ", error);
        });
    ```

#### Parameters

    - #####  Optional options: object 
  
        Parameters of the hi-res and preview images.

        - #####  Optional fileName:  string 
  
            The name of the resulting print file. This name is only used when you allow end-users directly downloading hi-res files using the links returned by the **finishProductDesign** method. The file name is combined with a file extension of configured output format. For example, if you pass `business_card` as a value of the argument and configure Customer's Canvas to save results in PDF, the result file name will be `business_card.pdf`.
        - #####  Optional generateLargePreviews:  boolean 
  
            If `true`, this method renders real-size proof images. If **largePreviewMaxWidth** and **largePreviewMaxHeight** are not set, then this method will take the size of the rendered surface. The default value is `false`.
        - #####  Optional generateProductProof:  boolean 
  
            If `true`, this method renders previews of all product pages to a multi-page `PDF` file. The default value is `false`.
        - #####  Optional largePreviewMaxHeight:  number 
  
            The maximum height of large proof images. By default, this value is equal to the surface height.
        - #####  Optional largePreviewMaxWidth:  number 
  
            The maximum width of large proof images. By default, this value is equal to the surface width.
        - #####  Optional pregenerateHiRes:  boolean 
  
            If `true`, this method starts generating hi-res outputs in the background when called. In this case, the resulting links to hi-res outputs will be obtained before the image generation is complete. If `false`, this method only updates links and starts generating print files when a request to download them is received. The default value is `false`.
        - #####  Optional pregeneratePreviewImages:  boolean 
  
            If `true`, this method starts generating preview images in the background when called. In this case, the resulting links to these images will be obtained before the image generation is complete. If `false`, this method only updates links to these images and starts generating the preview images when a request to download them is received. The default value is `false`.
        - #####  Optional proofMaxHeight:  number 
  
            The maximum height of proof images, in pixels. This value is `500` by default.
        - #####  Optional proofMaxWidth:  number 
  
            The maximum width of proof images, in pixels. This value is `500` by default.
        - #####  Optional stateId:  string 
  
            Specifies a state file name without an extension, up to 36 symbols length. If such a file exists, it will be overwritten. You can pass this parameter for any user except **master** and **default**. If you omit this parameter, then a new file name is generated.
    - #####  Optional data: object 
  
        Parameters of variable data printing. You can pass either **dataSet** or **itemsData** into this method.

        - #####  Optional dataSet:  [IDataSet](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.idataset.htm.md) 
  
            Creates a new product from the initial product definition and applies variable data to it.
        - #####  Optional itemsData:  [IItemsData](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iitemsdata.htm.md) 
  
            Applies a single set of variable data to the product.

#### Returns Promise &lt; IFinishDesignResult &gt;
 
    Returns a promise with the resulting product details: the bounding rectangle, links to the hi-res output, permanent links to proof images, a return-to-edit URL, user changes, userId, and stateId.
