Zebra printer - Switch between different label / paper sizes on the fly programatically

A Andre Rippstein 3 years 7 months ago
1935 2 0

Hi

My customer uses about 400 ZEBRA QLn320 printers with field staff distributed all over the country. Currently all printers are setup to print a label of 12cm height and 7cm width. We use gap sense mode to detect the starting position of the next label. To print the content of the label we use the ZPL language and the LinkOS XAMARIN SDK. Everything works fine so far.

Due to business needs my customer needs to print to much smaller labels (2cm x 5cm) in the future. I have no problems to update the printer settings with the ZEBRA Printer Utility to the new paper format. What I'm looking for is a way to switch between these paper formats programmatically so that field staff can switch between different label sizes during the day WITHOUT connecting the printer to the ZEBRA Printer Utility.

Is this possible by sending ZPL commands to the printer? Is there an example available?

Thank you for your help!

Please Register or Login to post a reply

2 Replies

E Efkan YILMAZ

Hi Andre,
You can, but it would help if you added a UI element to have the user let your app know that they changed media.  The printer has no way of really knowing that the media type changed and assumes the user always is using the same media. The QLn is 8 dots per mm.
So you flow is:
handle media change event
send: '~JC'  to tell the printer to auto-detect label length
add the ^PW command to your label formats to set the width dynamically or just send it separately as '^XA^PW400^XZ'

You can also send the ^SS command to set the label length programatically, but it is not recommended as this can result in extra blank labels being printed occasionally and shorter printhead life as it is more likely to try to print on the web surface.

G George an

Hey, I have a problem updating the printer setting with the ZEBRA printing and I am trying to connect it with the ZEBRA utility. I am sending some updates on https://www.bestessays.com.au/thesis-writing.php and I am sure you will help me to fix this error.

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