NewPage.fromPdfPage constructor

NewPage.fromPdfPage(
  1. PdfPage sourceDocument, {
  2. PageSize? pageSize,
  3. EdgeInsets? margins,
  4. int? rotation,
  5. Color? backgroundColor,
})

New page from template. sourceDocumentge The the PdfPage to use for the template. pageSize The size of the page. Defaults to A4. margins The margins of the page. Defaults to 0. rotation The rotation of the page. Defaults to 0. backgroundColor The background color of the page. Defaults to white.

Implementation

factory NewPage.fromPdfPage(PdfPage sourceDocument,
    {PageSize? pageSize,
    EdgeInsets? margins,
    int? rotation,
    Color? backgroundColor}) {
  return NewPage._(
      type: 'pdfPage',
      pdfPage: sourceDocument,
      pageSize: pageSize ?? PageSize.a4,
      margins: margins,
      rotation: rotation,
      backgroundColor: backgroundColor);
}