PdfPage constructor
PdfPage()
Initializes a new instance of the PdfPage class.
//Create a new PDF documentation
PdfDocument document = PdfDocument();
//Create a new PDF page
PdfPage page = document.pages.add();
//Draw the text to the page
page.graphics.drawString(
'Hello World!!!',
PdfStandardFont(PdfFontFamily.helvetica, 27),
brush: PdfBrushes.darkBlue,
bounds: const Rect.fromLTWH(170, 100, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementation
PdfPage() {
_helper = PdfPageHelper(this);
_initialize();
}