setPrintWidth static method

List<int> setPrintWidth(
  1. PaperSize paperSize
)

Implementation

static List<int> setPrintWidth(PaperSize paperSize) {
  switch (paperSize) {
    case PaperSize.mm58:
      return [0x1D, 0x57, 0x80, 0x01]; // 384 dots
    case PaperSize.mm72:
      return [0x1D, 0x57, 0x00, 0x02]; // 512 dots
    case PaperSize.mm80:
      return [0x1D, 0x57, 0x40, 0x02]; // 576 dots
    case PaperSize.mm110:
      return [0x1D, 0x57, 0x40, 0x03]; // 832 dots
  }
}