getDesignMetadata
This API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.
Retrieves information about the design.
Returns
Information about the design. This is a Promise that resolves with the following object:
pageMetadataIterable<PageMetadata>The information associated with each page of the design.
The order of pages is not guaranteed.
Information about a page within a design with fixed or unbounded dimensions.
typestringThe type of page.
The only valid value is "absolute".
dimensionsPageDimensionsThe dimensions of the page, in pixels.
This may be undefined because some types of pages don't have dimensions, such as whiteboards.
widthnumberThe width of the page, in pixels.
heightnumberThe height of the page, in pixels.
titlestringThe name of the page.
This is optional and will be empty if the user hasn't set a title.
Pages that do not have fixed or unbounded dimensions currently do not return metadata.
typestringThe type of page.
The only valid value is "unsupported".
durationInSecondsnumberThe duration of the whole design in seconds.
This is the precise value, which differs from what is displayed in the UI as duration in Canva UI is formatted differently.
titlestringThe title of the user's design.
This is optional and will be undefined if the user hasn't set a title.
defaultPageDimensionsPageDimensionsThe default dimensions that a new page will have when it is added to a design. It is possible for a user to resize a page without resizing the entire design, e.g. by clicking "Expand to Whiteboard". However, there will always be a single set of default dimensions for a design that is applied whenever a new page is created.
This is optional and will be undefined if the design is unbounded (e.g. Whiteboard or Doc).
widthnumberThe width of the page, in pixels.
heightnumberThe height of the page, in pixels.