【问题标题】:Zebra RW420 is printing the ZPL commandsZebra RW420 正在打印 ZPL 命令
【发布时间】:2017-02-17 15:28:35
【问题描述】:

我正在尝试使用ZPL 命令将图像打印到Zebra RW420 打印机。 但打印机正在打印 ZPL 命令。
无论我是从我的程序还是从Zebra Setup Utility 发送命令,都会观察到这种行为,并且它在另一台Zebra iMZ320 打印机上工作正常。
所以我相信它是一个配置选项,但我不知道命令是什么。

【问题讨论】:

    标签: android zebra-printers zpl


    【解决方案1】:

    我后来想通了。 打印机的语言未设置为 ZPL,因此为了修复它,我使用了以下代码:

    BluetoothConnection connection = new BluetoothConnection(getMacAddress());
    connection.open();
    try {
        ZebraPrinter printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, connection);
        printer.sendCommand("! U1 setvar \"device.languages\" \"zpl\"");
    } finally {
        try {
            connection.close();
        } catch (ConnectionException ignored) {
        }
    }
    

    或者基本上发送以下 ZPL 命令: ! U1 setvar "device.languages" "zpl"

    【讨论】:

      猜你喜欢
      • 2023-03-19
      • 1970-01-01
      • 2014-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-16
      • 1970-01-01
      相关资源
      最近更新 更多