When you define a ZPL label template in the Serialized Manufacturing application, you have two text fields to include ZPL codes:

  • Layout
  • Template


Both fields accept valid ZPL codes, but these codes serve different purposes.


Layout Field versus Template Field


FieldDescriptionRequired field?Built-in Validator?Stored on the printer?
LayoutIt represents the skeleton of the label, hence it mostly stores static information, for example, the basic structure.NoNoYes
TemplateIt defines the dynamic information of the label as placeholders, for example, serial number, batch, expiry date, and so on. This information is different per label.

This field can contain static information, for example, the position of the placeholders. The field can even contain the full layout information.

This ZPL code is sent to the printer for each label separately.
YesYes (only for the placeholders, and not for the full ZPL code)No


If you want to print a huge amount of labels efficiently, it is recommended to define a layout because this information is stored on the printer at the beginning of the printing job and accelerates the printing process by sending only the dynamic information per label to the printer.


You can also define dynamic information in the layout, for example, a QR code holding multiple parameters. However, you need to match the dynamic information in the Layout field with the dynamic information in the Template field.


Use Case Example


1. Define the dynamic information in the Template field.

  • Locate the ZPL file on the printer where the dynamic information will be used.
  • Provide the placeholders in the Template field and associate the placeholders with field numbers (^FN). Note: You can only use the placeholders supported by that template type. The application lists the supported placeholders.
  • Provide the print quantity settings.


In the following example:

  • ^XFE:1A88.ZPL^FS --> the dynamic information will be used for the 1A88.ZPL file on the drive E: of the printer.
  • ^FN1 --> ${expiration_date:YYYY.MM}
  • ^FN2 --> ${batch_number}
  • ^FN3 --> ${serial_number},${product_description},${license_number},${company},${phone_number}
  • ^PQ1 --> the print quantity setting on the printer. In this example, the number of labels to print is set to "1" (default), so the label with the same values is printed only once, there are no further copies. Note: The setting on the hardware versus the printing order settings in Movilitas.Cloud is different.
  • ^FD --> Field descriptor
  • ^FS --> Field separator


^XA
^XFE:1A88.ZPL^FS
^FN1^FD${expiration_date:YYYY.MM} ^FS
^FN2^FD${batch_number}^FS
^FN3^FD${serial_number},${product_description},${license_number},${company},${phone_number}^FS
^PQ1
^XZ


2. Define the layout in the Layout field, by providing static as well as dynamic information.

  • To save the layout on the printer, define the filename and the location on the printer. Make sure that this matches the value in the Template field.
  • To provide dynamic information, refer to the placeholders of the Template field by using the field numbers (^FN).
  • Provide other information related to the layout as needed.


The following ZPL code snippet is an example of how to save the layout to a file and where to store it on the printer:

  • The file name is 1A88.ZPL.
  • The file is saved on drive E of the printer.
^DFE:1A88.ZPL^FS

The following ZPL code snippet is an example of how the field numbers are positioned and manipulated as part of the layout:

  • ^FN1 is the expiration date
  • ^FN2 is the batch number
  • ^FN3 is a QR code holding information about multiple parameters (serial number, product description, license number, company, and phone number)


^FO302,115,1^A0I,25,25^FN1^FS
^FO302,172,1^A0I,25,25^FN2^FS
^FO20,95^BQ,2,2^FN3^FS
^FO170,984^A0N,25,25^FN2^FS
^FO170,1041^A0N,25,25^FN1^FS
^FO335,950^BQ,2,2^FN3^FS


Example on the GUI


The following examples illustrate the above use case on the UI, after going to Serialized Manufacturing application --> Labels --> Templates.


Example 1:


Example 2: