layoutPdf abstract method

Future<bool> layoutPdf(
  1. Printer? printer,
  2. LayoutCallback onLayout,
  3. String name,
  4. PdfPageFormat format,
  5. bool dynamicLayout,
  6. bool usePrinterSettings,
  7. OutputType outputType,
  8. bool forceCustomPrintPaper,
)

Prints a Pdf document to a local printer using the platform UI the Pdf document is re-built in a LayoutCallback each time the user changes a setting like the page format or orientation.

returns a future with a bool set to true if the document is printed and false if it is canceled. throws an exception in case of error

Implementation

Future<bool> layoutPdf(
  Printer? printer,
  LayoutCallback onLayout,
  String name,
  PdfPageFormat format,
  bool dynamicLayout,
  bool usePrinterSettings,
  OutputType outputType,
  bool forceCustomPrintPaper,
);