Zebra RW420 is printing the ZPL commands

785 views Asked by At

I am trying to print images using ZPL commands to the Zebra RW420 printer. But the printer is printing the ZPL commands.
This behavior is observed whether I am sending the commands from my program or from the Zebra Setup Utility, and it is working fine on another Zebra iMZ320 printer.
So I believe it is a configuration option, but I don't know what is the command.

1

There are 1 answers

0
PhpLou On BEST ANSWER

I figured it out later. The language of the printer wasn't set to ZPL so to fix it I used the following code:

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) {
    }
}

Or basically send the following ZPL command: ! U1 setvar "device.languages" "zpl"