Resize designs

After a user creates a design for a product, they may want to change its dimensions to suit another product. This lets a user print the same design on different products.

This document explains how to resize an existing design for another product.

When a partner resizes an existing design, the partnership SDK:

  • Duplicates the design.
  • Applies properties of another product.
  • Assigns a separate design ID.

By duplicating a design, users can preserve their original design. Canva enables the feature to duplicate designs only on request.

Some examples of the properties you can apply are height, width, and units. Canva maintains the properties for all products of an integration. Canva identifies each product with a partner product ID. To resize an existing design, a partner must pass a design ID and a partner product ID.

Partners must request Canva to enable the feature to duplicate designs.

To raise a request:

  • Navigate to the Canva Helpdesk.
  • Select Integration support.
  • Fill out the required fields.
  • Click Send.

To get the ID of an existing design, use the onDesignOpen callback when a user creates the design.

The following shows how to store the design ID in a variable:

let userDesignId;
(async () => {
const api = await Canva.Partnership.initialize({
apiKey: '<partner_api_key>',
autoAuthToken: '<auto_auth_token>',
container: document.getElementById('container'),
});
api.showCatalog({
onProductSelect: (opts) => {
api.createDesign({
...opts,
onDesignOpen: ({ designId }) => userDesignId = designId;
});
},
});
})();
javascript

Partners can save the design ID locally or in a database. Partners can associate the design ID with the current user.

To resize a design, call the createDesign method, and pass the design ID and the partner product ID.

api.createDesign({
designId: userDesignId,
partnerProductId: "Poster11x17in",
designSource: "direct",
onBackClick,
onArtworkCreate,
});
javascript

The Partnership SDK uses the existing design as the starting point of a new design.

  • Users can't resize their design from inside the Canva editor.
  • Users can resize only their designs, not others'.