lsongdev / node-escpos

🖨️ ESC/POS Printer driver for Node.js
https://npmjs.org/escpos
Other
1.38k stars 423 forks source link

bixolon srp 275iii printer (dot matrix printer) image not printing correctly #338

Open BudAma87 opened 3 years ago

BudAma87 commented 3 years ago
return new Promise((resolve, reject) => {
  const logo = require("path").join(logoPath, "logo.png");

  if (!fs.existsSync(logo)) {
    printImage = false;

  }

  escpos.Image.load(logo, function (image) {

    device.open(function (err) {
      if (err) {

        reject(false);
      }

      else {

        if (isLargeFont) {
          printer.size(1, 2);
        }
        if (printImage) {
          printer
            .align("ct")
            .image(image, "d24")

        }

        if (cashDrawerKick) {
          printer.cashdraw();
          printer.cashdraw();
        }

        if (printText !== "") {

          printer
            .feed()
            .align("LT")
            .color(0)
            .text(printText)
            .feed()
            .feed()
            .feed()
            .feed()
            .size(1, 1)
            .cut()

        }

        printer.close();

        resolve(true);
      }
    });//device

  });
592da commented 2 years ago

Hi @BudAma87 ! did you find a solution?