PdfPage constructor

PdfPage(
  1. PdfDocument pdfDocument, {
  2. PdfPageFormat pageFormat = PdfPageFormat.standard,
  3. PdfPageRotation rotate = PdfPageRotation.none,
  4. int? index,
  5. int? objser,
  6. int objgen = 0,
})

This constructs a Page object, which will hold any contents for this page.

Implementation

PdfPage(
  PdfDocument pdfDocument, {
  this.pageFormat = PdfPageFormat.standard,
  this.rotate = PdfPageRotation.none,
  int? index,
  int? objser,
  int objgen = 0,
}) : super(pdfDocument,
          params: PdfDict.values({
            '/Type': const PdfName('/Page'),
          }),
          objser: objser,
          objgen: objgen) {
  if (index != null) {
    pdfDocument.pdfPageList.pages.insert(index, this);
  } else {
    pdfDocument.pdfPageList.pages.add(this);
  }
}