How to Print Hindi and Arabic on Zebra Labels
languagesunicodehow-toPrinting English on a label is easy. Printing Hindi or Arabic is where many ZPL projects hit a wall. Letters appear in the wrong order, vowel marks float in odd places, or an Arabic word comes out as a row of disconnected characters. If you’ve seen any of that, you’re not doing something silly. These scripts are hard for printers, and it helps to understand why before you pick a fix.
Why these scripts are different
In English, each letter is a separate shape that sits next to the previous one. Arabic and Hindi don’t work like that.
Arabic runs right to left, and letters change shape depending on whether they come at the start, middle or end of a word, or stand alone. A program has to look at each letter’s neighbours to decide which shape to use. That process is called shaping.
Hindi is written in Devanagari, where consonants and vowel signs combine. A vowel sign might sit above, below, before or after the consonant it belongs to, and some consonant pairs merge into a single combined glyph. Again, correct display needs a shaping step that reorders and substitutes characters.
Your laptop does all this without being asked. A label printer may not. Whether yours can depends on the model and the firmware version, and you won’t know for certain until you test.
Option one: let the printer do it
Start by trying the printer’s own capabilities, because if they work, it’s the neatest solution. You need three things:
- A Unicode TrueType font that covers the script, such as one from the Noto family, installed on the printer. The TrueType install guide explains how.
^CI28, so the printer reads your text as UTF-8.- For Arabic and Hebrew, the right-to-left field setting.
^XA
^CI28
^CWZ,E:NOTOARABIC.TTF
^FO700,50^FPR^AZN,50,50^FDمرحبا^FS
^XZ
Print it, and show the result to someone who reads the language. Don’t judge it yourself unless you’re fluent: bad shaping can look convincing to anyone who isn’t. If the letters join properly and the order is right, you’re done.
Option two: render it as a picture
If the result is wrong, don’t spend days fiddling. Render the text on a computer, which has a full shaping engine, and send the result to the printer as a bitmap using ^GF. The printer isn’t asked to understand the script at all. It just prints dots.
This is the dependable route, and it works on any ZPL printer regardless of firmware or memory. You can try it in the text-to-graphic tool: type the text, choose a font that contains the script, adjust the size, and copy the generated ZPL. It runs entirely in your browser, using your system’s own text engine, and for right-to-left text there’s a direction option.
The trade-offs are real, though. A graphic is bigger than a line of text, so labels take a little longer to send. You can’t change it on the printer. And for dynamic data, such as a different customer name on every label, you need to generate the image as part of your software rather than hand-pasting it. Libraries for drawing text to a bitmap exist for every mainstream language, and the result then gets converted to ^GF data exactly as the tool does. Our article on printing any font as a graphic explains the steps.
Mixed content
Labels often mix scripts: an Arabic product name beside a Latin part number and an English warning. Handle this by splitting the label into fields, each with the right method. The Arabic name could be a graphic, while the number and warning remain ordinary text. Mixing methods on one label is perfectly fine.
Be careful with numbers inside right-to-left text. They’re displayed left to right even within a right-to-left sentence, and getting the overall order right is a common source of errors. Test with real data and have a native reader check.
Test, test, test
Keep a sample label for each language with typical strings, including the longest realistic value. Check that long text doesn’t run off the edge. Print on the real media, since fine strokes in Devanagari and Arabic need good print quality to stay readable. A lot of the detail in these scripts is in small marks, and a weak print can lose them. See small label design for tips on keeping detail.
Summary
Try the printer first with a Unicode font and ^CI28. If the shaping is wrong, switch to graphics and stop worrying. Whichever you pick, have a native speaker check a printed sample. For the wider picture on languages, read language support in ZPL, and for the encoding side see Unicode and code pages.