Next / Previous / Contents / Shipman's homepage

6.4. class PageDims: Page layout

Use an instance of this class to describe the overall dimensions of a page, as in a simple-page-master. Here is the constructor:

PageDims(pageBox, pageMargins=None, frameMargins=None,
pageBox An instance of class Box that defines the paper size.
pageMargins An instance of class MarginSet that describes the desired margins around the entire page. The default is zero margins all around.
frameMargins Another instance of class MarginSet used to describe the heights of the page header (in the .top attribute) and the page footer (in .bot). The values of the .left and .right attributes of the argument are ignored. The default value is both zero.
bodyMargins An instance of class MarginSet. The height between the header and the body is taken from its .top attribute, and the height between the body and footer is taken from its .bot attribute. The default is that both are zero.

The arguments to the constructor are available as instance attributes .pageBox, .pageMargins, .frameMargins, and .bodyMargins.

A few prefabricated PageDims instances are available; see Section 6.5, “pageDimsFactory(): Some pre-built PageDims instances”.