height property Null safety

double height

Gets the height of the page.

//Create a PDF document.
PdfDocument document = PdfDocument();
//Get page width.
double width = document.pageSettings.width;
//Get page height.
double height = document.pageSettings.height;
//Create page and draw text.
document.pages.add().graphics.drawString(
    'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
    brush: PdfBrushes.black, bounds: Rect.fromLTWH(0, 0, width, height));
//Save and dispose document.
List<int> bytes = document.save();
document.dispose();

Implementation

double get height => _size.height;