PdfMargins class Null safety

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.
write-only
bottom double
Gets or sets the bottom margin size.
read / write
hashCode int
The hash code for this object.
read-only, inherited
left double
Gets or sets the left margin size.
read / write
Gets or sets the right margin size.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
top double
Gets or sets the top margin size.
read / write

Methods

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

Operators

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