reset method

List<int> reset()

Clear the buffer and reset text styles.

Sends ESC @ to initialize the printer, which returns it to standard (continuous) mode — the default for roll paper printers. ESC @ already cancels page mode on compliant printers.

Implementation

List<int> reset() {
  List<int> bytes = [];
  bytes += cInit.codeUnits; // ESC @ — initialize / cancel page mode
  _styles = PosStyles();
  bytes += setGlobalCodeTable(_codeTable);
  bytes += setGlobalFont(_font);
  return bytes;
}