cut method

List<int> cut({
  1. PosCutMode mode = PosCutMode.full,
  2. int? line,
})

Cut the paper

mode is used to define the full or partial cut (if supported by the priner)

Implementation

List<int> cut({PosCutMode mode = PosCutMode.full, int? line}) {
  List<int> bytes = [];
  bytes += emptyLines(line ?? 3);
  if (mode == PosCutMode.partial) {
    bytes += cCutPart.codeUnits;
  } else {
    bytes += cCutFull.codeUnits;
  }
  return bytes;
}