User Guide

Document functions 203
Example
The following command resizes the canvas to include all the items in the document, enlarging the
canvas if necessary.
fw.getDocumentDOM().setDocumentCanvasSizeToDocumentExtents(true);
See also
dom.setDocumentCanvasSizeToSelection()
dom.setDocumentCanvasSizeToSelection()
Availability
Fireworks 3.
Usage
dom.setDocumentCanvasSizeToSelection()
Arguments
None.
Returns
Nothing.
Description
Calculates the size of all the items in the selection and resizes the document canvas accordingly.
See also
dom.setDocumentCanvasSizeToDocumentExtents()
dom.setDocumentImageSize()
Availability
Fireworks 3.
Usage
dom.setDocumentImageSize(boundingRectangle, resolution)
Arguments
boundingRectangle
A rectangle that specifies the size to which the document should be scaled
(see “Rectangle data type” on page 11).
resolution Specifies the resolution for the scaled document (see “Resolution data type
on page 12).
Returns
Nothing.
Description
Scales the document to fit in the specified rectangle at the specified resolution.