how to print forward slash using Zebra Programming Language

146 Views Asked by At

I am trying to print static text "Contact/Ven" in zebra sticker using a ZPL but instead of printing "Contact/Ven", it is printing as per the below image.

enter image description here

Can anyone suggest how to print correct text "Contact/Ven" ?

My code looks like below

^XA ^CF0,32 ^FO30,70^FDTest^FS

^CF0,22 ^FO400,65^FDMfg. by Test^FS

^CF0,18 ^FO400,95^FD12742 E Caley Ave Suite E^FS

^FX Third section with QR code and table in a single row. ^CI28 ^FO30,110^BQ,2,3^FDQA,PKG: {{PACKAGE_NAME}}, Weight: {{PACKAGE_WEIGHT}}, LOT#: {{LOT_NUMBER}}, BT#: {{BATCH_TYPE}}, Receive Date: {{RECEIVE_DATE}}, Contact/Ven: {{CONTACT_NAME}}, DES: {{DEPARTMENT}}, Use by Date: {{USE_BY_DATE}}, Manufactured Date: {{MANUFACTURED_DATE}}^FS ^FO10,50^GB770,335,4^FS

^CF0,20 ^FO280,140^FDPKG^FS ^FO440,140^FDTets^FS

^FO280,175^FDWeight^FS ^FO440,175^FDTets^FS

^FO280,210^FDLOT#^FS ^FO440,210^FDTets^FS

^FO280,245^FDBT#^FS ^FO440,245^FDTets^FS

^CI28 ^FO280,280^FDContact/Ven^FS ^FO440,280^FDTets^FS

^FO280,315^FDDES^FS ^FO440,315^FDTets^FS

CI28 ^FO30,350^FH^FDRcvd. Date: 07\2F12\2F2023 Manufactured Date: 07\2F12\2F2023
Use by Date: 07\2F12\2F2023 ^FS ^XZ
2

There are 2 best solutions below

0
Magoo On

[Educated guess]

Change

^FDContact/Ven

to

^FH^FDContact\2FVen

Given that the date string provided by the last code line is being produced correctly. \2F being hex-code 2F=/

0
EdHayes3 On

The output of your label with Labelary is: enter image description here

For the last line on your label, the ZPL is:

^FO30,350^FH^FDRcvd. Date: 07\2F12\2F2023 Manufactured Date: 07\2F12\2F2023
Use by Date: 07\2F12\2F2023 ^FS

The command ^FH needs a parameter character, Like this ^FH\

If you are having problems with other parts of your label, look into using that command properly to fix it.

Additional documentation

^FH hexIndicator Configures the hexadecimal escape character, allowing the current field to embed character codes in the field data. This can be particularly useful when field data values may contain characters which would otherwise be interpreted as ZPL command or parameter delimiters.

Parameters:

hexIndicator: The hexadecimal escape character. Any ASCII character may be used, except the lowercase letters a-z and the ZPL command and parameter delimiters.

Example (common usage): ^FH_