瀏覽代碼

Merge remote-tracking branch 'origin/master'

master
CANCERYS\kw093 3 月之前
父節點
當前提交
915e1bb3c1
共有 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 // 4. Send the ZPL command to the printer via a network socket
val printData = zplCommand.toByteArray() val printData = zplCommand.toByteArray()
repeat(printQty ?: 1) { index ->
Socket(printerIp, printerPort).use { socket -> Socket(printerIp, printerPort).use { socket ->
val os: OutputStream = socket.getOutputStream() val os: OutputStream = socket.getOutputStream()
os.write(printData)
os.flush()
}
repeat(printQty ?: 1) { index ->
os.write(printData)
os.flush()
}
} }
} }
} catch (e: Exception) { } catch (e: Exception) {


Loading…
取消
儲存