Next / Previous / Contents / Shipman's homepage

4.6. class PageDim: 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:

PageDim(pageBox, pageMargins=None, frameMargins=None,
            bodyMargins=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 PageDim instances are available; see Section 4.7, “pageDimFactory(): Some pre-built PageDim instances”.