setRollPaperMode method

List<int> setRollPaperMode()

Explicitly set continuous roll paper mode.

Call this after reset if your printer still prints with a fixed page height (e.g. A4). This sends CAN (0x18) to abort any active page mode data, then ESC @ to re-initialize, ensuring continuous roll paper printing with no fixed page length.

Implementation

List<int> setRollPaperMode() {
  List<int> bytes = [];
  // CAN (0x18) — cancel data in page mode without printing / advancing.
  bytes += [0x18];
  // ESC @ — re-initialize to standard (continuous) mode.
  bytes += cInit.codeUnits;
  _styles = PosStyles();
  return bytes;
}