浏览代码

update print

master
cyril.tsui 3 个月前
父节点
当前提交
f43678e727
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      src/main/java/com/ffii/core/utils/ZebraPrinterUtil.kt

+ 4
- 4
src/main/java/com/ffii/core/utils/ZebraPrinterUtil.kt 查看文件

@@ -57,12 +57,12 @@ open class ZebraPrinterUtil {

// 4. Send the ZPL command to the printer via a network socket
val printData = zplCommand.toByteArray()
repeat(printQty ?: 1) { index ->
Socket(printerIp, printerPort).use { socket ->
val os: OutputStream = socket.getOutputStream()
os.write(printData)
os.flush()
}
repeat(printQty ?: 1) { index ->
os.write(printData)
os.flush()
}
}
}
} catch (e: Exception) {


正在加载...
取消
保存