PdfMargins constructor

PdfMargins()

Initializes a new instance of the PdfMargins class.

//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();

Implementation

PdfMargins() {
  _helper = PdfMarginsHelper(this);
}