Label Template Syntax: Difference between revisions

From Commander4j
Created page with "See Zebra ZPL Label for a label designed for a Zebra Pallet Label or Intermec IPL Label for a label designed using the IPL language. For explanation of it's format see below. DEFINE BARCODE BARCODE1 02<PADLEFT(<*EAN*>,14,0)>20<PADLEFT(<*VARIANT*>,2,0)>15<EXPIRYDATE(yy)><EXPIRYDATE(MM)><EXPIRYDATE(dd)>37<*QUANTITY^0000*>^10<*BATCH_NUMBER*> This line is used to create a barcode variable. You may wonder why you cannot use the same string to print the label and..."
 
No edit summary
 
Line 1: Line 1:
[[Category: Commander4j]]
See [[Zebra ZPL Label]] for a label designed for a Zebra Pallet Label or [[Intermec IPL Label]] for a label designed using the IPL language. For explanation of it's format see below.
See [[Zebra ZPL Label]] for a label designed for a Zebra Pallet Label or [[Intermec IPL Label]] for a label designed using the IPL language. For explanation of it's format see below.
   
   

Latest revision as of 11:33, 25 August 2024

See Zebra ZPL Label for a label designed for a Zebra Pallet Label or Intermec IPL Label for a label designed using the IPL language. For explanation of it's format see below.

DEFINE BARCODE BARCODE1   02<PADLEFT(<*EAN*>,14,0)>20<PADLEFT(<*VARIANT*>,2,0)>15<EXPIRYDATE(yy)><EXPIRYDATE(MM)><EXPIRYDATE(dd)>37<*QUANTITY^0000*>^10<*BATCH_NUMBER*>

This line is used to create a barcode variable. You may wonder why you cannot use the same string to print the label and skip this step. The reason that using the Zebra ZPL language, when encoding in the Code 128 barcode symbology you need to determine what type of data is in the barcode. Numeric data can be compressed when it appears in pairs (even number) of characters. Alphabetic characters have to use a different encoding.

So - the purpose of the DEFINE BARCODE directive it to let Commander4j look at the complete barcode string in advance and insert the appropriate commands to switch Code Sets before the data is sent to the barcode printer.

The Printer Commands which are used to switch between modes are also defined below.

DEFINE BARCODE BARCODE2   00<*SSCC*>

This is another example of a barcode variable.

DEFINE BARCODE FNC1       >8

FNC1 is required only at the end of variable length data section. It is not required as the last character in the bar code.

DEFINE BARCODE CODEA      >9

Subset A supports numbers, upper-case letters, and control characters, such as tab and new-line

DEFINE BARCODE CODEB      >6

Subset B supports numbers, upper- and lower-case letters and some additional characters.

DEFINE BARCODE CODEC      >;

Subset C supports numbers only. It must have an even number of digits.

DEFINE BARCODE END        *END*

This is used to indicate the end of the DEFINE section of the label.