I need to trim leading spaces from a variable I'm sending to a label with ZPL2.
This is what the row of code looks like:
^FO260,39^ACR,73,25^FD$1HWWRPQT^FS
$1HWWRPQT is a variable.
I tried this:
^FO260,3^ACR,73,25^FDLTRIM$($1HWWRPQT)^FS
But it returns:
LTRIM$($1HWWRPQT)
How do I trim the variable? Do I need something between the ^FD and the LTRIM$()?
1 Replies
Hello Curtis,
As you can see in ZPL Programming Guide: https://www.zebra.com/content/dam/zebra/manuals/printers/common/program…; the LTRIM$ command is ZBI language command, not ZPL command. You can call ZBI from ZPL with "^JI" or "~JI" ZPL command. Although, it will require you to write some program on ZBI language, not just to call LTRIM$ function.
You can find ZBI examples here: Zebra Basic Interpreter (ZBI) Support & Downloads | Zebra
Hope it helps.
Dmitry Prokhorov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies