brown.core.paper

classes

A description of a type of paper to base Pages on.

Construct and return a PaperInterface based on this Paper.

Returns: PaperInterface

__init__ (width, height, margin_top, margin_right, margin_bottom, margin_left, gutter=None) permalink view source

arguments:

width (Unit): The paper width.

height (Unit): The paper height.

margin_top (Unit): The paper top margin.

margin_right (Unit): The paper right margin.

margin_bottom (Unit): The paper bottom margin.

margin_left (Unit): The paper left margin.

gutter (Unit): The paper gutter.

properties

width: Unit The page width permalink view source

height: Unit The page height permalink view source

margin_top: Unit The top margin permalink view source

margin_right: Unit The right margin permalink view source

margin_bottom: Unit The bottom margin permalink view source

margin_left: Unit The left margin permalink view source

gutter: Unit The page gutter. permalink view source

TODO: Gutter support is not fully implemented.

live_width: The printable width of the page permalink view source

read-only.

live_height: The printable height of the page permalink view source

read-only.

class methods

from_template (template) permalink view source

Construct a Paper object from a set of pre-configured paper types.

arguments:

template (str): Name of the Paper template (case-sensitive)

returns:

inherited from Paper

methods

make_rotation () permalink view source

Create a 90 degree clockwise rotation of this Paper.

returns:

The gutter field is not changed in this new Paper.