PdfMargins class

A class representing PDF page margins.

//Creates a new PDF document.
PdfDocument document = PdfDocument()
  //Create and set new PDF margin.
  ..pageSettings.margins = (PdfMargins()..all = 20)
  ..pages.add().graphics.drawString(
      'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12));
//Saves the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Constructors

PdfMargins()
Initializes a new instance of the PdfMargins class.

Properties

all double
Sets the margins of all side.
no getter
bottom double
Gets or sets the bottom margin size.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
left double
Gets or sets the left margin size.
getter/setter pair
Gets or sets the right margin size.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top double
Gets or sets the top margin size.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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