Field Commands
^FX - Comment
Adds non-printing comment to code
^FX - Comment
Overview
The ^FX command allows you to add comments to ZPL code that are ignored by the printer and do not appear in the output.
Syntax
^FXcomment textParameters
- comment text = Any text (ignored by printer)
Description
- Adds human-readable comments to ZPL code
- Text is completely ignored during printing
- Useful for documentation and debugging
- Improves code readability and maintainability
Usage Notes
- Comments are not printed
- Entire line following ^FX is treated as comment
- Useful for explaining complex label logic
- Can include any characters
Example
^XA
^FX Print invoice label for order #12345
^FO50,50
^ADN
^FXCompany name and logo section
^FDAcme Corp^FS
^FO50,100
^ADN
^FXOrder information
^FDOrder: 12345^FS
^FO50,150
^ADN
^FDDate: 2024-10-28^FS
^XZBest Practices
- Use descriptive comment text
- Document section purposes
- Explain complex field logic
- Include version or timestamp information
Related Commands
^XA- Start Format^XZ- End Format