dom.setDocumentCanvasSize()

Availability

Fireworks 3, with new argument added in Fireworks CS3.

Usage

dom.setDocumentCanvasSize(boundingRectangle, currentPageOnly)

Arguments

boundingRectangle
A rectangle that specifies the new canvas size for the document, in pixels (see Rectangle data type). Any items outside the specified rectangle are removed.

currentPageOnly
A Boolean value that specifies whether the change in canvas size applies to all pages or only the current page. If the value is true, only the current page is resized. If it is false, all pages of the document are resized. The default value is true.

Returns

Nothing.

Description

Sets the document’s canvas size to the specified rectangle and apply the change to the current page or all pages.

Example

The following command sets the canvas to a size of 200 by 200 pixels:

fw.getDocumentDOM().setDocumentCanvasSize({left:150, top:150, right:350, bottom:350});