PRINT 18Meet us at Print 18. Chicago, IL. Sept. 30 - Oct. 2

addSurfaces Method


  • Adds a number of surfaces (pages) to the product.

        // When we get the product.
        .then(function(product) {
            // Add an empty page and the "postcard" template to the beginning.
                [{ width: 300, height: 300 }, { designFile: "postcard" }],
            // If there was an error while adding pages to the product.
            .catch(function (error) {
                console.error("Adding surfaces failed with exception: ", error);


    • surfaces: SurfaceTypes []

      An array of surfaces (pages) to add.

    • Optional position: number

      A position in the surface array where new surfaces should be added. The index of the first surface is 0. By default, this method adds pages to the end of the surface array.

    Returns Promise < Product >

    The product instance where the surfaces (pages) were added.