2.7.1 Class page

A page is a thin wrapper around a canvas, which defines some additional properties of the page.

class page( canvas, pagename=None, paperformat=paperformat.A4, rotated=0, centered=1, fittosize=0, margin=1 * unit.t_cm, bboxenlarge=1 * unit.t_pt, bbox=None)
Construct a new page from the given canvas instance. A string pagename and the paperformat can be defined. See below, for a list of known paper formats. If rotated is set, the output is rotated by 90 degrees on the page. If centered is set, the output is centered on the given paperformat. If fittosize is set, the output is scaled to fill the full page except for a given margin. Normally, the bounding box of the canvas is calculated automatically from the bounding box of its elements. Alternatively, you may specify the bbox manually. In any case, the bounding box is enlarged on all sides by bboxenlarge.