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.
Partners can also use Canva's Magic Resize feature to automatically resize a user’s design. This lets a partner upsell users to more profitable products.

How resizing works

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.

Step 1: Request Canva to enable the feature

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.

Step 2: Get the design ID

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:
1
let userDesignId;
2
3
(async () => {
4
const api = await Canva.Partnership.initialize({
5
apiKey: '<partner_api_key>',
6
autoAuthToken: '<auto_auth_token>',
7
container: document.getElementById('container'),
8
});
9
10
api.showCatalog({
11
onProductSelect: (opts) => {
12
api.createDesign({
13
...opts,
14
onDesignOpen: ({ designId }) => userDesignId = designId;
15
});
16
},
17
});
18
})();
Copied!
Partners can save the design ID locally or in a database. Partners can associate the design ID with the current user.

Step 3: Resize the design

To resize a design, call the createDesign method, and pass the design ID and the partner product ID.
1
api.createDesign({
2
designId: userDesignId,
3
partnerProductId: "Poster11x17in",
4
designSource: "direct",
5
onBackClick,
6
onArtworkCreate
7
});
Copied!
The Partnership SDK uses the existing design as the starting point of a new design.

Limitations

    Users can't resize their design from inside the Canva editor.
    Users can resize only their designs, not others'.
Last modified 1mo ago