Problem printing PNG on ZTC 140Xi4 / 140Xi3

K Karin Beck 3 years 7 months ago
7 1 0

Hello,
 
we are developing a software to print png images with Zebra SDK. The labels can be printed, but they are cut off.
We have tried to control the cuttig using the SETFF command but it doesn't work like expected:
 
Here is our code:
 
 
printer.getConnection().write("! U1 JOURNAL\r\n! U1 SETFF 50 200\r\n".getBytes());  zplStart = "^XA";  zplEnd = "^XZ";  printer.getConnection().write(zplStart.getBytes());  printer.printImage(filename, 0, 0, 944, 1120, true);  printer.getConnection().write(zplEnd.getBytes()); 
 
Without the SETFF command, there was a lot of white space after the png.
 
Any help would be appreciated.
Thank you

Please Register or Login to post a reply

1 Replies

K Karin Beck

We have found a solution that seems to work for us: By setting the label length before printing the png, the label is printed correctly:

String zplStart = "^XA";String setLabelLength = "^LL1120";String zplEnd = "^XZ";printer.getConnection().write(zplStart.getBytes());printer.getConnection().write(setLabelLength.getBytes());printer.printImage(filename, 0, 0, 944, 1120, true);printer.getConnection().write(zplEnd.getBytes());

CONTACT
Can’t find what you’re looking for?