Reputation: 11
I use phonegap/cordova plugin and Zebra iMZ320 to print by means of zpl containing text, images (converted on-the-fly to zpl) and a barcode. I have no mark or gap, so I need to use continuous mode. I cannot know in advance the length of what will be printed. So, how can I calculate the exact label length to pass it to the "^LL" command (I don't want to pass a maximum value because it would be a waste)? I would like to obtain the same thing as if line print were used (it stops right after printed).
Upvotes: 1
Views: 1106
Reputation: 33
@Antonio you can calculate the content size beforehand based on the size of text (along with number of lines), size of images and bar-code. After that you can append that size in the "^LL" command directly.
For example :
I have 70 lines each line with size 30 so 70*30 = 2100 plus I have an image of length 400 so total size 2100 + 400 = 2500.
So I my code will look like:
^XA^LL2500
-----------
--Content--
-----------
^XZ
I hope this answers your question.
Upvotes: 2