^FB
Field BlockPreview: partialWraps field data into a fixed-width text block with a line limit, justification and an optional hanging indent.
Syntax
^FBa,b,c,d,eParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| a | Width available to each line, in dots. A value smaller than the font width leaves no printable text.0 to the label width, in dots | 0 |
| b | Maximum number of printed lines.1 to 9999 lines | 1 |
| c | Extra positive space or negative overlap between consecutive lines, in dots.-9999 to 9999 dots between lines | 0 |
| d | Alignment within the block. The final justified line is printed left-aligned.L left, C centre, R right, J justified | L |
| e | Indent applied to the second and every later line, in dots.0 to 9999 dots hanging indent | 0 |
How it works
^FB changes the next field-data string into a text block. It uses the current origin, font and orientation, splits words to fit the declared width and starts each following line after the configured line spacing.
The maximum-line value is a real print limit, not a clip marker. When there is more text than the block allows, the printer consolidates the remainder into the last visible line; a template must reserve enough lines before it is sent to production.
Left, centre, right and justified alignment apply inside the block. A hanging indent only affects the second and later lines, which makes it useful for addresses and item descriptions but not for a simple centred heading.
Example
^XA
^PW400
^LL220
^FO40,30^A0N,30,30^FB300,3,6,C,20^FDA field block wraps a short sentence into aligned lines.^FS
^XZRendering…
How the preview on this site handles it
The preview expands the block into positioned text fields. Overflow is consolidated into the last line and can extend past the block width, so the Validator also marks the ^FB command when that happens. Rotated blocks remain an approximation.
Common mistakes
- Treating the declared width as a guarantee that every last-line character stays inside it. Overflow consolidation can make that final line wider.
- Reusing one ^FB for several fields. ^FS ends the block; every separate field needs its own ^FB command.
- Leaving the line limit at 1 for dynamic address or product text. A long value turns into an unreadable final line instead of adding rows.