Printing half way down paper

I'm using a ZQ520 printer with 4x6in paper.  I am trying to print to it but no matter what I do it seems to start the printing halfway down the page.  I tried using ZPL with the following code:

ZebraPrinter printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, connection);String setLanguage = "\r\n! U1 setvar \"device.languages\" \"zpl\"\r\n";String zpl = "^XA^FO0,0^XGR:IMAGE.GRF^XZ";connection.write(setLanguage.getBytes());printer.storeImage("R:IMAGE.GRF", ZebraImageFactory.getImage(bitmap), 0, 0);connection.write(zpl.getBytes());

I've also tried it with

printer.printImage(ZebraImageFactory.getImage(bitmap), 0, 0, 1024, 1024, false);

I've tried tweaking the numbers for the image sizes, that doesn't seem to make a difference of where its placed, just its size.  I used the windows zebra printer setup utility to make sure that the size of the paper is set to 4x6, but when I print out a configuration report the "Label" section reports a width of 104mm (correct) and a height of 8191mm (wrong).  The "ZPL Configuration Information" shows Label Length = 417 (with no units). 

I'm assuming this is a configuration issue but I'm not sure how to solve it, can you help me figure out how to get it to print at the top of the label?

Image uploaded from iOS (1).jpg

Joseph Nicolia
I was able to resolve this

I was able to resolve this issue by sending the size of the label before each print using the following zpl :

! U1 setvar \"zpl.label_length\" \"height\"\r\n! U1 setvar \"ezpl.print_width\"\"width\"\r\n"

I tried using the windows setup and sending those commands but they do not seem to stick, so unfortunately I have to send them each time.  But this at least resolves the issue.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Joseph, Try following

Hi Joseph, Try following these commands with "^XA^JUS^XZ".  It should save these settings.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments