iMZ320 - ZPL TextBlock not wrapping (^TB)

// Expert user has replied.
J John Ferlazzo 3 years 7 months ago
475 2 0

Hi,
 
I am developing a Xamarin mobile application to print receipts via bluetooth and need to be able to wrap text with ZPL.
I am using an iMZ320 Printer with Firmware version v73.19.15Z.
 
When I initially connect to printer, I ensure I set the device language to ZPL. When complete I check the language and it is set as 'hybrid_xml_zpl'.
 
I am trying to run a quick test with the following commands:
 
^XA
^PW600
^LL700
^FO40,200,0
^AE,N,15,10
^TBN,300,400
^FDThis is a test string to see if the text is wrapped inside the text block at all
^FS
^XZ
 
Unfortunately it is not wrapping the text to the next line, instead it overlaps the text over itself on the same line (See attached image).
Is there anything I am doing wrong? The documentation suggests that ^TB is available only for printers with firmware version V60.14.x, V50.14.x, or later.
 
Appreciate any assistance on this as I am relatively new to ZPL and mobile printing.
 
Thanks.

Please Register or Login to post a reply

2 Replies

S Samantha Corn

Hi John,
And alternative to ^TB is ^FB, which has no firmware restrictions. Complete information on this command can be found on page 160 of this ZPL guide, but try changing the ^TBN,300,400 to ^FB300,400.

W Ward Christensen

^FB is the answer, but
> try changing the ^TBN,300,400 to ^FB300,400.
is incorrect, it would be: ^FB300,,,,

SO, you don't GET to specify the height, but you can sort of figure it by character height in scalable fonts, or use the labelary web site to fiddle with it until you are satisfied.

Here's one I recently used:
^FB600,20,0,C
so my label is 2" wide on a 300DPI printer, I'll allow up to 20 lines - these are PRINTED lines, not INPUT lines, so long input lines => multiple output lines - no extra spacing between lines, and "C"entered.

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