ZPL guide 5 of 9

SSCC-18 pallet label: a worked ZPL example

A worked ZPL example of a pallet label that prints an SSCC-18 as a Code 128 barcode, explained line by line. It shows the guide's three ways to write the data and where the guide is unclear.

The label, line by line

Question What does a pallet label with an SSCC-18 barcode look like in ZPL?

This guide builds one pallet label in ZPL: a title, two lines of text, two rules and one barcode that carries an SSCC-18. It covers only the ZPL. What an SSCC is, how its last digit is worked out and how a logistic label should be laid out are in the GS1-128 and SSCC-18 explainer, and the GS1 check digit calculator tests a number.

The example number is 376104250021234569, which is 18 digits. The guide's table of application identifiers lists 00 for the SSCC, followed by exactly 18 digits. Written with its identifier the number is (00)376104250021234569, and that is the string the barcode field carries below. The explainer works through this same number.pp. 100, 103

A label format starts with ^XA and ends with ^XZ. The guide says the label prints when the printer receives ^XZ.pp. 370, 375

Each item on the label is a field: a position from ^FO, the command that makes the item, the data in ^FD for items that have data, and ^FS to close it. The guide recommends an ^FS after every command that creates a printable line.pp. 190, 201, 204

The setup lines at the top (^PW, ^LL, ^LH and ^CF, and ^BY just before the barcode) are not fields and carry no ^FS. The guide's shortcuts section says an ^FS after format commands such as ^LL and ^LH is unnecessary, and its ^FS entry recommends one after every command that creates a printable line. The two statements fit together: the setup commands create nothing printable, so this example leaves them without ^FS and puts one after every field.pp. 204, 1765, 1766

example.zplZPL
^XA
^PW800
^LL1200
^LH0,0
^CF0,36,36
^FO40,40^A0N,70,70^FDPALLET 12/30^FS
^FO40,140^GB720,6,6^FS
^FO40,170^FDORDER 55012^FS
^FO40,230^FDDC-04 / D-07^FS
^FO40,300^GB720,6,6^FS
^BY3
^FO60,360^BCN,300,Y,N,,D^FD(00)376104250021234569^FS
^XZ

Line 1 opens the format. Lines 2 and 3 set the print width to 800 dots and the label length to 1200 dots, and line 4 puts the label home at 0,0. Line 5 makes font 0 at 36 by 36 dots the default for text fields that have no ^A of their own. Line 6 is the title: a field 40 dots from the left and 40 down, in font 0 at 70 by 70 dots. Line 7 is a rule 720 dots wide and 6 dots high at 40,140. Lines 8 and 9 are two text fields in the default font. Line 10 is a second rule. Line 11 sets the barcode module width to 3 dots. Line 12 is the barcode field at 60,360: Code 128, not rotated, 300 dots high, interpretation line below, the UCC check digit parameter left empty, and mode D, with the SSCC and its application identifier as the data. Line 13 closes the format, and the label prints.

Label size and home position (lines 2 to 4)

Question How do the first lines set the label size and the home position?

^PW sets the print width in dots. It accepts 2 up to the width of the label, and a larger value is set to the label's maximum width. Line 2 asks for 800 dots.p. 329

WarningNot stated by the guide: where in a format ^PW has to appear, or how long a width sent in a format stays in force. The guide gives the last permanently saved value as its default.p. 329

^LL sets the label length in dots, from 1 to 32000 and not more than the maximum label size. The guide says it is necessary for continuous media, meaning media with nothing physical that divides it into labels. Line 3 asks for 1200 dots.p. 294

Warning^LL has a second value, N by default: N makes the length apply only to continuous media, and Y makes it apply to all media, including gap and mark media. Line 3 sends only the length. The guide's table gives N as the default and, in the same cell, says that when no value is present the current setting is left unchanged; it does not say which of the two applies when the value is left out. The guide's Format line prints a period between the two values while its parameter table lists them as two values, and it does not comment on the period; the Format lines of other commands with several values, such as ^FO, use commas.pp. 201, 294

^LL stays in force until the printer is turned off or another ^LL arrives. It does not survive a power cycle unless ^JUS is sent.p. 294

To affect the label being defined, ^LL must come before the first ^FS; the guide also ties this placement to compatibility with existing printers.p. 294

^LH sets the label home, the point ^FO counts from. By default the home is the upper-left corner, position 0,0. A new home affects only the fields that come after it, and it is kept until the printer is turned off or another ^LH arrives. ^LH must also come before the first ^FS, which the guide ties to compatibility with existing printers, and the guide recommends it as one of the first commands in a format. That is why the setup lines sit above every field.pp. 201, 293

Line 4 sends the default, 0,0, again, so that a home moved by an earlier format cannot shift this label.

The guide lists printheads of 6, 8, 12 and 24 dots per millimeter. At 8 dots per millimeter, 800 by 1200 dots is 100 by 150 mm; on another printhead the same dot counts give another size, so work the numbers out for your printer. The coordinates guide and the label size guide, listed under related guides, cover the arithmetic.pp. 210, 294

Both ^PW and ^LL are ignored on the HC100 printer.pp. 294, 329

Text and rules (lines 5 to 10)

Question How are the title, the text lines and the rules made?

^CF sets the default font, character height and character width for text fields that carry no ^A of their own. Line 5 chooses font 0 at 36 by 36 dots, so lines 8 and 9 need no font command.pp. 60, 154

WarningNot stated by the guide: how long a ^CF stays in force. Its entry says that a ^CF that gives neither height nor width reuses the last ^CF values, and it lists power-up values (font A, height 9, width 5 or the last permanently saved value). So send your ^CF in every format that depends on it.p. 154

^A applies to one field: the font it names is used only for that field's ^FD, and the next field without a ^A of its own uses the ^CF default font. Font 0 is the scalable font, which accepts any height and width from 10 to 32000 dots. Line 6, the title, uses font 0, normal orientation (N) and 70 by 70 dots.pp. 50, 60, 1585

^FO puts the upper-left corner of a field at a distance in dots from the label home, x across and y down, each from 0 to 32000. A value that is too large can put the field completely off the label.p. 201

^FD holds the text to print. It may contain any printable character except ^ and ~, which are command prefixes.p. 190

^GB draws boxes and lines with the same command. Its first three values are width, height and border thickness in dots, and the width and height must not be smaller than the thickness. Lines 7 and 10 each send 720, 6 and 6: a rule 720 dots wide and 6 dots high whose thickness equals its height. The last two values, line color and corner rounding, are left out and keep their defaults (black, no rounding).p. 210

WarningThe captions of the guide's own examples on pages 210 and 211 give a width of 0 inch or a height of 0 inch, which is below the range its entry states (from the value of the thickness). Do not copy them; this label keeps both values at least as large as the thickness.pp. 210, 211

Lines 8 and 9 name no ^A, so they print in the ^CF default. The text in them is made-up sample data.

The SSCC barcode (lines 11 and 12)

Question How is the SSCC barcode made with ^BC?

The barcode is made with ^BC, the Code 128 command. Its mode parameter includes modes for data that carries application identifiers, covered below. The GS1 side of the label is in the explainer linked at the top of this guide.pp. 94, 95

^BY sets the module width, the width of the narrowest bar, in dots (1 to 10), and it stays in force until the next ^BY. Line 11 asks for 3. Code 128 has a fixed ratio, so the ratio value has no effect on it and the example leaves it out.pp. 94, 148, 149, 1587

In line 12 the ^BC values are, in order: orientation N (normal); height 300 dots (1 to 32000; if left out, the height comes from ^BY); interpretation line Y (the default), so the readable text prints; interpretation line above the code N (the default), so it prints below; the UCC check digit parameter left empty, which keeps its default of N; and the mode, D.pp. 94, 95, 99, 1588

Parameters are position-specific, so an empty value between two commas keeps that parameter's default.p. 1588

Mode D is the guide's UCC/EAN mode. The code starts in the right subset followed by FNC1; the printer removes parentheses and spaces before encoding but prints them in the interpretation line; and it works out whether a check digit is needed, calculates it and prints it. It also sizes the interpretation line itself.pp. 95, 102

WarningThe guide documents mode D for x.11.x and newer firmware. It says you can find a printer's firmware version by printing a configuration label. It does not say what mode D does on older firmware; its other modes are covered in the next section.pp. 47, 95

The guide's walk-through of the application identifier 00 format in mode D gives the data as 00 (parentheses allowed), then 17 characters, then one more character, a placeholder that the printer replaces with the check digit it calculates. In the guide's own figure the data ends in 0 and the interpretation line shows 1 as the last digit.pp. 101, 102

The field data in line 12 is built to that pattern: (00), the 17 digits 37610425002123456, and the final digit 9 in the placeholder position.

WarningNot stated by the guide: what happens when the placeholder position already holds the correct check digit instead of a throwaway one. The example sends the real 9 there, and nothing on the guide's pages says it is kept, ignored or checked. After printing a test label on your printer, compare the last digit under the barcode with the calculator linked at the top of this guide.p. 102

WarningNot stated by the guide: whether the UCC check digit parameter has any effect in mode D. The guide's mode D examples leave it empty or set it to N, and the mode description says the printer decides about the check digit itself, so line 12 leaves it empty.pp. 94, 95, 101, 105

WarningNot stated by the guide: whether a font command placed before ^BC changes the interpretation line in mode D. The guide says the line can be printed in any font that way, and also that mode D sizes the line automatically, without reconciling the two; its example of the font route (page 102) does not use mode D. This example puts no ^A directly before ^BC; the ^CF default from line 5 is in force, and the guide does not say whether the line uses it.pp. 94, 95, 102

WarningThe guide is inconsistent about older firmware and the interpretation line. Its section on writing the line as a separate text field is headed 'With firmware version later than x.10.x', the figure caption in the same section reads 'Firmware Older Than X.10.X', and the paragraph above introduces its example of printing the line in a different font as being for firmware x.11.x or later. Mode D prints the parentheses itself, so this example needs neither route.p. 102

The guide's other ways to write the same barcode

Question Which other ^BC modes can carry an SSCC, and how do they differ?

The ^BC mode parameter takes N (no selected mode, the default), U (UCC Case Mode), A (Automatic Mode) and D (UCC/EAN Mode). For the application identifier 00 format the guide walks through N, U and D, and it says there are several ways to write it without saying which to prefer.pp. 95, 100, 101

Mode U allows exactly 19 characters in ^FD, chooses subset C with FNC1 by itself and inserts the check digit by itself. In the guide's mode U figure for the 00 format, the data is 00 followed by 17 digits, 19 characters in all.pp. 95, 101

WarningNot reconciled by the guide: its mode U example for chained identifiers (page 104) writes >; and >8 in the data and sends 36 digits, well over the 19 that the mode U description allows. This guide does not use that form.pp. 95, 101, 104

WarningIn mode U, digits beyond 19 are eliminated, and a shorter string is padded on the right with zeros to 19, which the guide says gives an invalid interpretation line. For example, an 18-digit SSCC sent without the 00 would be padded with one zero rather than used as it stands.p. 95

WarningNot stated by the guide: whether parentheses are accepted in mode U, or whether its interpretation line shows them. The guide says so only for mode D, and its mode U figure shows the line as digits only.pp. 95, 101, 102

In mode N the guide's walk-through starts the data with >; (the start code for subset C) and >8 (FNC1), then 00 and 17 characters, and sets the UCC check digit parameter to Y so that the printer prints the 20th character itself. Mode N is not limited to 19 characters.pp. 96, 101

Mode A analyzes the data and chooses the packing and the subset shifts itself; four or more digits in a row shift to subset C.p. 95

The guide shows these modes side by side without saying they give identical symbols, so do not assume it: pick one mode and keep to it.

example.zplZPL
^XA
^BY3
^FO60,360^BCN,300,Y,N,,U^FD0037610425002123456^FS
^XZ

The same barcode field in mode U. The data is 00 followed by the first 17 digits of the SSCC, 19 characters in all, and the printer adds the check digit. The empty fifth value keeps its default, as in the main example.

Before you send it

Question What should I check before sending the format to a printer?

TipCheck the number first. The calculator linked at the top of this guide tests an SSCC's check digit, and the explainer covers the layout a logistic label should follow, which this guide does not repeat.

The data of a ^BC field is limited to the width of the label (its length if the barcode is rotated). Make sure the symbol, at the module width you choose, fits inside the print width you set with ^PW.pp. 94, 329

TipFor more on ^BY and barcode sizing in general, see the linear barcodes guide; for ^A and ^CF, the text and fonts guide; for ^GB, the boxes guide. All three are listed under related guides.

The same label with BarcoderX

Question Where does BarcoderX fit in?

BarcoderX is a .NET SDK for thermal labels and barcodes; the published samples are on the Developers page. For pallet labels in BarcoderX beyond the ZPL, see Pallet labels.

Questions

Which ^BC mode should I use for an SSCC?

The guide documents three ways to write the application identifier 00 format: mode D (parentheses allowed, check digit inserted, x.11.x and newer firmware), mode U (exactly 19 characters, check digit inserted) and mode N (you write the start code and FNC1 yourself and ask for the check digit with the fifth value). It does not say which to prefer; this guide uses D and shows U.pp. 95, 100 to 102

Do I type the check digit myself?

In mode N, give 17 characters after the identifier and set the fifth value to Y; the printer prints the 20th character. In mode U the printer inserts it. In mode D the last position is a placeholder that the printer replaces with the digit it calculates.pp. 101, 102

Why does the data have parentheses when the barcode does not?

In mode D the printer removes parentheses and spaces before encoding but prints them in the interpretation line.pp. 95, 102

Commands in this guide

BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 47, 50, 60, 94 to 96, 99 to 105, 148, 149, 154, 190, 201, 204, 210, 211, 293, 294, 329, 370, 375, 1585, 1587, 1588, 1765, 1766.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.