ZPL Repository
The ZPL Repository stores ready-made ZPL text per record, for example the product photo of a customer item as a ZPL graphic (^GFA block). A ZPL layout retrieves that text while the label is printed, so one label layout prints a different image for every customer item. You no longer need a layout per item, and the image does not have to be hard-coded in the layout.
The repository is generic: every entry belongs to a record and has a Code. One record can hold several ZPL texts, for example FRONT for the product photo and LOGO for a brand logo, and a label can print each of them on its own position. In this version the repository is maintained from the Customer Item Card.
Maintain ZPL texts of a customer item
- Open the Customer Item Card and choose Cust. Item > ZPL Repository (also available under Extra).
- The ZPL Repository list opens, filtered on this customer item. The caption shows which customer item you are working on.
- Create a line with a Code (for example
FRONT) and a Description. The line is linked to the customer item automatically. - Choose Import ZPL Text and select a text file (
.txt) that contains the complete ZPL string. The column Has ZPL Text shows whether a text is present. - Export ZPL Text downloads the stored text as
<Code>.txt, for example to check or reuse it. Clear ZPL Text removes the text from the line.
Note
3PL Dynamics stores the text exactly as it is imported and prints it unchanged. There is no conversion, scaling or validation. Supply a complete and valid ZPL block, including its header. The correctness of the block and the result on the printer are the responsibility of the party that supplies it.
When a customer item is deleted, its ZPL Repository entries are deleted as well. The Copy Item function does not copy ZPL Repository entries to the new item.
Prepare a ZPL image
- Convert the image (PNG, JPG) to a ZPL graphic with a ZPL tool of your choice, for example ZebraDesigner or the Labelary image converter. Choose the size in dots that fits the label and the resolution of the printer.
- The result is a
^GFAblock with its header, for example^GFA,24016,24016,38,<data>. Save it as a text file. Compressed or uncompressed data are both accepted; there is no limit on the length of the text. - Import the file on the line with the matching code, as described above.
Print the ZPL text on a label
- Open the ZPL layout and add a line of type Image.
- Enter the X Coordinate and Y Coordinate of the line. They determine the position (
^FO) of the image on the label. - In the Value Function Set of the line, add the function
GETZPLREPOSITORYof the WMS ZPL Functions and fill the parameterCODEwith the code of the ZPL text, for exampleFRONT. - Leave the parameter
ENTITYempty, or set it toITEM, to print the text of the customer item. The customer item is taken from the record the label is printed for: a document detail line, a document line, a handling unit or its content, or the customer item itself. With the optional parameterNOyou print the text of a fixed customer item number instead.
The label then contains ^FO<x>,<y>, followed by the stored ZPL text and ^FS. When no text is found, for example because the customer item has no entry with that code or the entry has no text, the image line is skipped and the rest of the label is printed as usual. When Value Mandatory of the line is set to Mandatory (Error When Empty), an error is raised instead.
To print two images, for example a product photo and a logo, add two lines of type Image, each with its own position and its own code. This is configuration, not development. Image lines without a value function set keep printing the Picture Text of the line as before.
Other entities
The function GETZPLREPOSITORY can also return the ZPL text of the customer (ENTITY = CUSTOMER, the customer is taken from the document or from the customer item) or of the record the label is printed for (ENTITY = SOURCE). The ZPL Repository itself can currently only be maintained from the Customer Item Card; a page action for other entities such as the customer is not yet available.
Importing the ZPL texts of many customer items at once is not yet supported; each text is imported per customer item and code.