PageFormat#
- class PageFormat[source]#
Class to define the format of a page in the pdf report. The page formate defines the page size and orientation as well as the surrounding margins of all four sides. With these information the printable area can be calculated.
- __init__(page_size: PageSize = PageSize.SIZE_A4, page_orientation: PageOrientation = PageOrientation.PORTRAIT, margin_left: float = 20.0, margin_top: float = 10.0, margin_right: float = 10, margin_bottom: float = 10, mirror_margins: bool = False)[source]#
Create a new PageFormat object
- Parameters:
page_size – Pagesize one of the enums of PageSize
page_orientation – Page orientation one of the enums in PageOrientation
margin_left – Left margin in mm
margin_top – Top margin in mm
margin_right – Right margin in mm
margin_bottom – Bottom margin in mm
mirror_margins – Flag if the margins should be mirrored for even and odd page numbers
- property page_orientation: PageOrientation#
The page orientation
- Getter:
Returns the page orientation
- Setter:
Sets the page orientation
- property page_size: PageSize#
The page size
- Getter:
Returns the page size
- Setter:
Sets the page size
- property margin_top: float#
The top margin in millimeters
- Getter:
Returns the top margin
- Setter:
Sets the top margin
- property margin_left: float#
The left margin in millimeters
- Getter:
Returns the left margin
- Setter:
Sets the left margin
- property margin_right: float#
The right margin in millimeters
- Getter:
Returns the right margin
- Setter:
Sets the right margin
- property margin_bottom: float#
The bottom margin in millimeters
- Getter:
Returns the bottom margin
- Setter:
Sets the bottom margin
- property mirror_margins: bool#
Flag to mirror the left and right margins for even and odd page number
- Getter:
Returns the flag
- Setter:
Sets the flag