PageMargins class Worksheet

Printed page margins, in inches (the unit used by <pageMargins>).

The PageMargins.normal, PageMargins.wide, and PageMargins.narrow presets mirror Excel's built-in margin sets.

Constructors

PageMargins({double left = 0.7, double right = 0.7, double top = 0.75, double bottom = 0.75, double header = 0.3, double footer = 0.3})
Creates margins from explicit edge/header/footer values (in inches).
const
PageMargins.narrow()
Excel's "Narrow" margins (0.25 sides, 0.75 top/bottom, header & footer 0.3).
const
PageMargins.normal()
Excel's "Normal" margins (0.7 / 0.7 / 0.75 / 0.75, header & footer 0.3).
const
PageMargins.wide()
Excel's "Wide" margins (1.0 all round, header & footer 0.5).
const

Properties

bottom double
Bottom margin, in inches.
final
Footer margin (distance from the bottom edge to the footer), in inches.
final
hashCode int
The hash code for this object.
no setteroverride
Header margin (distance from the top edge to the header), in inches.
final
left double
Left margin, in inches.
final
Right margin, in inches.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top double
Top margin, in inches.
final

Methods

copyWith({double? left, double? right, double? top, double? bottom, double? header, double? footer}) PageMargins
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override