使用Android的BROTHER SDK通过WIFI进行打印时出现ERROR_WRONG_LABEL

时间:2018-05-09 10:41:51

标签: android

我有兄弟QL-710W标签打印机,我尝试使用Brother的SDK通过WIFI进行打印,但每次出现ERROR_WRONG_LABEL错误时,

我试过了

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)

但没有解决方案正在运作,

我的代码在

下面
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);

然而Brother的Android应用程序成功打印没有任何错误。

1 个答案:

答案 0 :(得分:1)

我找到了解决方案......

我已完成以下代码

 mPrinterInfo.labelNameIndex = 15;

我尝试使用for循环,其中我使用了 labelNameIndex ,使用了不同的值1,2,3 ..... 15并试图打印,但最后用15来完成。< / p>