Reputation: 440
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.
Upvotes: 1
Views: 866
Reputation: 440
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"
Upvotes: 1