ZPL FB FIELD BLOCK COMMAND DOES NOT PROPERLY CENTER THE TEXT
Article ID: 46411518
Topic or Information
The Field Block ^FB command does not center the text as expected.
Why can't I put the text in the middle?
Applies To
ZPL compatible printers
Details
A customer reported a problem centering the text using the ^FB command. The command details looked to be correct but the field was slightly offset. (Note:This example was using a 2" wide 203 dpi printer)
^XA^MMT^LT0^PW408^LH0,0^LS0
^FO010,010^GB200,100,1,B^FS
^FO010,010^GB100,100,1,B^FS
^FO010,020^A0N,100,100^FB200,3,0,C,0^FD$5^FS
^XZ
If you look at the ^FB Command Details in the Read More>> link below, you will see that there are a few meta-commands that can be used in the data string for formatting the text. Specifically, \& adds a carriage return/line feed so you can have multiple lines of text in the block. (Note that you have to set the b parameter to something greater than 1 if you want more than one line of text)
It turns out, if you add \& to the end of a text line in the ^FB text and you are using the C option for justification, it properly centers the line, even if you only have one line of text.
Note: Use of the ^FH\ will interfere with this suggested work around so don't include that when creating any ZPL.
Here is the ZPL format that will help center the text......
^XA^MMT^LT0^PW408^LH0,0^LS0
^FO010,010^GB200,100,1,B^FS
^FO010,010^GB100,100,1,B^FS
^FO010,020^A0N,100,100^FB200,3,0,C,0^FD$5\&^FS
^XZ
Additional Information
^FB Command Details Read More>>
Source
David F

+ Applicable Products
- 105SLPlus Industrial Printers
- 105SLPlus Industrial Printers
- 110Xi4 Industrial Printer
- 140Xi4 Industrial Printer
- 170PAX4
- 170Xi4 Industrial Printer
- 220Xi4 Industrial Printer
- 2824 Plus Series
- G-Series GC Desktop Printers
- G-Series GK Desktop Printers
- G-Series GX Desktop Printers
- GC420d Desktop Printer
- GC420t Desktop Printer
- GK420 Healthcare Desktop Printers
- GK420d Desktop Printer
- GK420d Healthcare Desktop Printer
- GK420t Desktop Printer
- GK420t Healthcare Desktop Printer
- GK888 Desktop Printer
- GK888d
- GK888t
- GT800 Desktop Printer
- GX420Rx Desktop Printer
- GX420d Desktop Printer
- GX420t Desktop Printer
- GX420t Product Printers
- GX430d Desktop Printer
- GX430t Desktop Printer
- Industrial Printers
- LP 2824 Plus Desktop Printer
- Mobile Printers
- P4T Mobile Printers
- P4T Mobile Printers
- Print Engines
- QL Series Mobile Printers
- QL320 Mobile Printer
- QL420 Mobile Printer
- QLn Series Healthcare Mobile Printers
- QLn Series Mobile Printers
- QLn220 Healthcare
- QLn220 Mobile Printer
- QLn320 Healthcare
- QLn320 Mobile Printer
- QLn420 Mobile Printer
- R110Xi4 RFID Printer
- RFID Printers
- RP4T RFID Printers
- RP4T RFID Printers
- RW 220 Mobile Printer
- RW 420 Mobile Printer
- RW 420 Print Station
- RW Series Mobile Printers
- RZ400
- RZ600
- TLP 2824Plus Desktop Printer
- Xi Series Industrial Printers
- Z Series Industrial Printers
- ZD410 Series
- ZD410-HC
- ZD410D
- ZD420 Series
- ZD420-HC
- ZD420C
- ZD500 Desktop Printer
- ZD500 Desktop Printer
- ZD500R RFID Printers
- ZD500R RFID Printers
- ZE500 Print Engines
- ZE500 Print Engines
- ZE500R RFID Print Engine
- ZE500R RFID Print Engine
- ZM400
- ZM600
- ZQ500 Series Mobile Printers
- ZQ510 Mobile Printer
- ZQ520 Mobile Printer
- ZR600 Series Healthcare Mobile Printers
- ZR600 Series Mobile Printers
- ZR628
- ZT200 Series Industrial Printers
- ZT210 Industrial Printer
- ZT220 Industrial Printer
- ZT230 Industrial Printer
- ZT400 Series Industrial Printers
- ZT400 Series RFID Printers
- ZT410 Industrial Printer
- ZT410 RFID Industrial Printer
- ZT420 Industrial Printer
- ZT420 RFID Industrial Printer
- iMZ Series Mobile Printers
- iMZ220 Mobile Printer
- iMZ320 Mobile Printer