Retrieve loaded labels dimensions

// Expert user has replied.
D Dave Anderson 2 years 11 months ago
4 3 0

How can we read the label dimensions currently loaded in the printer. I can retrieve the loaded width via {}{\"ezpl\":null} but where is the label length (i.e. the length between the gaps)? In length I can only see the maximum length not the loaded length.
The printer clearly knows the label length as it can advance the roller correctly.
We have two types of labels (one long and one short) with the same width and we would like to inform the operator if the labels need to be changed.
Can anyone assist?

Please register or login to post a reply

3 Replies

S Steven Si

If the media is set to label mode...
After the media calibration on the printer, the "zpl.label_length" captures the length of the label that has just been calibrated. If you knew the label length before hand, you can set the "zpl.label_length" without media calibration in label mode
If the medial is set to continuous paper mode...
For continuous paper, of course there is no label calibration. Therefore whatever value in the "zpl.label_length" defines how much the media will be feed forward during each print.
If "I want to read the current length of the loaded media." is what you want, then there is no way to know the total length of the media that sits in the printer.

D Dave Anderson

The documentation for zpl.label_length says:
This command defines the length of the label. This command is necessary when using continuous
media (media that is not divided into separate labels by gaps, spaces, notches, slots, or holes).
I do not want to define the length, I want to read the current length of the loaded media.

R Robin West

The command you are looking for is:

{}{"zpl.label_length":null} 

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