0

I have Brother QL-710W label printer, I have tried to print via WIFI using Brother's SDK but every time I am getting ERROR_WRONG_LABEL error,

I have tried

ERROR_WRONG_LABEL when trying to print wireless using Android Brother Sdk for label printer

Android printing with Brother SDK via WIFI (ERROR_WRONG_LABEL)

but no solutions are working,

My code is below

mPrinterInfo.printerModel = PrinterInfo.Model.QL_710W;
mPrinterInfo.port = PrinterInfo.Port.NET;
mPrinterInfo.ipAddress = "192.168.8.100";
//mPrinterInfo.labelNameIndex = 5;
mPrinterInfo.paperSize = PrinterInfo.PaperSize.CUSTOM;
mPrinterInfo.paperPosition = PrinterInfo.Align.CENTER;
mPrinterInfo.orientation = PrinterInfo.Orientation.LANDSCAPE;

mPrinterInfo.labelNameIndex = LabelInfo.QL700.valueOf("W50").ordinal();
mPrinterInfo.isAutoCut = true;


mPrinterInfo.isAutoCut = true;
mPrinterInfo.isCutAtEnd = true;

LabelInfo mLabelInfo = new LabelInfo();
mLabelInfo.labelNameIndex = LabelInfo.QL700.valueOf("W50").ordinal();
mLabelInfo.isAutoCut = true;
mLabelInfo.isEndCut = true;
mLabelInfo.isHalfCut = false;
mLabelInfo.isSpecialTape = false;


mPrinter.setPrinterInfo(mPrinterInfo);
mPrinter.setLabelInfo(mLabelInfo);

However Brother's Android apps are successfully printing without any error.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
Siddhpura Amit
  • 14,534
  • 16
  • 91
  • 150

1 Answers1

1

I found solution...

I have done by below code

 mPrinterInfo.labelNameIndex = 15;

I have tried with for loop where i have used labelNameIndex with different value 1,2,3.....15 and tried to print, but in last with 15 it is done.

Siddhpura Amit
  • 14,534
  • 16
  • 91
  • 150
  • Have you tried this: `mPrinterInfo.labelNameIndex = LabelInfo.QL700.valueOf("W62").ordinal();` If it works you were using the wrong paper because in my solution I was using "W50" which is ordinal 13. `public static enum QL700 { W17H54(1), W17H87(2), W23H23(3), W29H42(4), W29H90(5), W38H90(6), W39H48(7), W52H29(8), W62H29(9), W62H100(10), W12(11), W29(12), W38(13), W50(14), W54(15), W62(16), W60H86(17), UNSUPPORT(255);` – GuilhE May 09 '18 at 14:31
  • Hi I want to know, how to detect what label size is added in printer at runtime. Is there any method by which we can do that? Getting the Label Size and setting the label size respectively at runtime. – Shubham Agrawal Oct 11 '18 at 11:15
  • No, I have no idea of that – Siddhpura Amit Oct 12 '18 at 02:27