thiendangit / react-native-thermal-receipt-printer-image-qr

React native thermal receipt printer
https://www.npmjs.com/package/react-native-thermal-receipt-printer-image-qr
112 stars 73 forks source link

Large white space on printImageBase64 #64

Open WordSystem3 opened 2 years ago

WordSystem3 commented 2 years ago

// função de Imprimir ingresso const imprimirComanda = async () => { try { const Printer = printerList[tipoImpressora];

  switch (impressora.tipo) {
    case 'ble':
      await BLEPrinter.connectPrinter(
        impressora?.inner_mac_address || ''
      );
      break;
    case 'net':
      await NetPrinter.connectPrinter(
        '192.168.1.100',
        9100
      );
      break;
    case 'usb':
      await USBPrinter.connectPrinter(
        impressora?.vendor_id || '',
        impressora?.product_id || ''
      );
      break;
    default:
  }

  Printer.printImageBase64(imagemImpressao, {
    beep: true,
    imageWidth: 200, // largura da impressão
    imageHeight: 500, // altura da impressão
    paddingX: 100,

    // beep: false,
    // imageWidth: 600, // largura da impressão
    // imageHeight: 1200, // altura da impressão
  });

  Printer.printBill('');

} catch (err) {
  console.warn(err);
}

};

every image has a large white space i don't know why

mmounirf commented 1 year ago

I've the same problem, did you find any solution for that? @WordSystem3

yaser-elbatal commented 1 year ago

did you find any solution for that?

vanhoai127 commented 1 year ago

I have the same problem, Please help me. image_white