set_margins

fpdf.set_margins(left: float, top: float, right: float = -1)

Description

Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them.

Parameters

left:

Left margin.

top:

Top margin.

right:

Right margin. Default value is the left one.

See also

set_top_margin, set_left_margin, set_right_margin, set_auto_page_break.