A Page object represents all of the shapes, lines, groups, and layers contained on a single page of a given Lucid document.

Page Format

The format to define a page in JSON is shown below:

PropertyDescription
idID
Identifier for a given page (must be unique).
Required
titleString
Page display title.
Required
settingsPage Settings
Data with settings to apply to the page. Pages are created with default settings when this data is omitted.
Optional
shapesArray[Shape]
An array of all shapes in the page.
Optional
dataBackedShapesArray[Data Backed Shape]
An array of all shapes in the page.
Optional
linesArray[Line]
An array of all lines in the page.
Optional
groupsArray[Group]
An array of all groups in the page.
Optional
layersArray[Layer]
An array of all layers in the page.
Optional
customDataArray[Custom Page Data]
See Custom Page Data for a description of it's purpose.
Optional
{
    "id": "page1",
    "title": "Main Plan",
    "settings": {
        "size": {
            "type": "letter",
            "format": "landscape"
        }
    },
    "shapes": [ ... ],
    "lines": [ ... ],
    "groups": [ ... ],
    "layers": [ ... ],
    "customData": [ ... ]
}

Page Settings

This data is used to set the page settings upon creation. Each field is optional and falls back on its default value when omitted.

PropertyDescription
fillColorColor
Determines the background color of the canvas. When omitted, the fill color defaults to #f2f3f5 for Lucidspark documents, and white for Lucidchart documents.
Optional
infiniteCanvasBoolean
Determines if the canvas extends infinitely. When omitted, Lucidspark documents default to true, and Lucidchart documents default to false.
Optional
autoTilingBoolean
Determines if the canvas extends when an item is moved outside the boundaries of the page. When omitted, defaults to true. When infiniteCanvas is true, this setting will not affect the page.
Optional
sizePage Size
Sets the size of the page. When infiniteCanvas is true, this setting will not affect the page. When omitted, defaults to a standard letter size with a portrait format.
Optional
{
    "fillColor": "#333",
    "infiniteCanvas": true,
    "autoTiling": false,
    "size": {
        "type": "custom",
        "w": 1000,
        "h": 1500
    }
}

Page Size

This data is used to set the size of the page. Page sizes can either be provided as standard sizes or as a custom size with specified height and width.

Standard Page Sizes

PropertyDescription
typeletter, legal, executive, a3, a4, a5, tabloid, folio, statement
Sets the dimensions of the page. All options are standard sizes that can be found on Wikipedia's page on paper sizes.
Required
formatportrait, landscape
Determines the orientation of the page. A value of portrait sets the height to be taller and the width to be shorter, and landscape behaves inversely. When omitted, this field defaults to portrait.
Optional
{
    "type": "executive",
    "format": "landscape"
}

Custom Page Size

PropertyDescription
typecustom
This field specifies that the page size is custom, rather than a standard size.
Required
wNumber
Sets the width of the page in pixels. This value is restricted to between 1 and 20,000 inclusive.
Required
hNumber
Sets the height of the page in pixels. This value is restricted to between 1 and 20,000 inclusive.
Required
{
    "type": "custom",
    "w": 1000,
    "h": 1500
}