getPaperFromLayout static method

Future<PrintPaper> getPaperFromLayout(
  1. ReceiptLayout layout,
  2. KeckPaperSize paperSize, {
  3. CodeTableId? codeTable,
  4. bool cut = true,
  5. PosCutMode cutMode = PosCutMode.full,
  6. bool brandMark = false,
  7. QrPrintMode qrMode = QrPrintMode.native,
  8. QrModuleSize qrModuleSize = QrModuleSize.auto,
})

Ein fertiges Layout ohne Beleg drucken (z. B. Monatsbericht als Bon, KasseneckApi.getCashregisterReportReceipt): dasselbe Blatt wie bei einem Beleg mit Server-Layout (getPaperFromReceipt), ohne Logo und Marke. Das Blatt traegt Bytes (Bluetooth/WLAN) und das myPOS-Papier zugleich.

Implementation

static Future<PrintPaper> getPaperFromLayout(
  ReceiptLayout layout,
  KeckPaperSize paperSize, {
  CodeTableId? codeTable,
  bool cut = true,
  PosCutMode cutMode = PosCutMode.full,
  bool brandMark = false,
  QrPrintMode qrMode = QrPrintMode.native,
  QrModuleSize qrModuleSize = QrModuleSize.auto,
}) async {
  final PrintPaper paper =
      PrintPaper(paperSize: paperSize, profile: KeckPrinterService.profile ?? CapabilityProfile(), codeTable: codeTable);
  // myPOS zeichnet den QR-Code immer selbst (natives Papier); fuer Bytes gilt die Einstellung des Druckers.
  await paper.setReceiptSheet(layout,
      brandMark: brandMark, cut: cut, cutMode: cutMode, qrMode: qrMode, qrModuleSize: qrModuleSize);
  return paper;
}