getDesignMetadata
Retrieves information about the design.
Returns
Information about the design. This is a Promise
that resolves with the following object:
pageMetadata
Iterable<PageContext>
The information associated with each page of the design.
The order of pages is not guaranteed.
dimensions
PageDimensions | undefined
The dimensions of the page, in pixels.
This may be undefined
because some types of pages don't have dimensions, such as whiteboards.
width
number
The width of the page, in pixels.
height
number
The height of the page, in pixels.
durationInSeconds
number
The 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.
title
string
OptionalThe title of the user's design.
This is optional and will be undefined
if the user hasn't set a title.
defaultPageDimensions
PageDimensions
OptionalThe 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).
width
number
The width of the page, in pixels.
height
number
The height of the page, in pixels.