Published:
A receipt from a Zebra mobile printer shows the Arabic customer
name backwards, or with every letter in its isolated form instead of joined.
The data is correct Unicode; the problem is what TEXT does with
it.
Arabic and Hebrew are written right to left, and Arabic letters change
shape depending on their neighbours. Both need a layout step before printing:
reorder the characters for display (the bidirectional algorithm) and pick
the joined form of each letter (shaping). We found no CPCL command for
either in Zebra's CPCL programming guide. A CPCL TEXT command
may therefore print the characters in the order received, each in its
isolated form. Whether a given printer and font do better depends on the
firmware; test on the actual device.
EG
(EXPANDED-GRAPHICS). In EG a 1 bit prints black.
Image to ZPL can output this directly:
choose CPCL (EG) as the output language and you get a ready session
(! header, PAGE-WIDTH, EG,
PRINT).^PA (advanced text properties)
for bidirectional layout and character shaping on Link-OS printers, used with a
TrueType font that contains Arabic. Check your printer's firmware
documentation before relying on it.The CPCL viewer flags any TEXT
line that contains right-to-left letters (rule CPC2005) and draws
EG graphics, so you can check the image route on screen first.
Our CPCL support follows Zebra's CPCL guide and has not been verified on a
physical CPCL printer.
Arabic needs reordering and letter shaping before printing. We found no CPCL command for either in Zebra's CPCL guide, so CPCL TEXT may print the characters in the order received, each in its isolated form.
Render the text as an image where the operating system does the layout, and send it with CPCL EG (EXPANDED-GRAPHICS), in which a 1 bit prints black.
Label size in dots versus real units, job structure, text and barcode syntax — the ZPL and TSPL differences that actually cost porting time.
Previewing and debugging CPCL without a printerMobile printer labels rendered in the browser: the session header that controls everything, the findings that matter, and what is not drawn.
ZPL vs CPCL: desk printers and mobile unitsWhich to use: ZPL unless the printer is a CPCL mobile unit. Side-by-side command table, how to check and switch the printer language, and how to port a label.
TSPL BITMAP prints a black boxA TSPL BITMAP that prints as a solid black square almost always has its bits inverted: in TSPL a 0 bit prints black. Check the data, then fix it.