Reputation: 15088
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.
Upvotes: 0
Views: 1057
Reputation: 15088
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.
Upvotes: 1