Advanced
ZPL label templates
Use external templates with TonCut data and check the rendered result.
Choose a template for each label type
Label configuration offers TonCut and ZPL layouts, with separate template files for pieces and reusable offcuts. The ZPL pages also provide a code-template field, placeholder help and previews. Check the prepared labels before printing.
Open Print labels from the Results menu. Select the printer and check its paper size.
Click Configuration and choose ZPL. On the piece-label page, browse to the saved .zpl template.
If printing offcut labels, choose their template on the separate reusable-offcut page.
On the labels page, match width and height to the template.
TonCut prepares ZPL labels at 12 dots per millimetre.
If the file uses {{CODE}}, fill the code-template field on that label type’s page. Check placeholders on the ZPL help page.
The code-template field supplies code content, not the whole ZPL document.
Click Apply. Browse piece/offcut previews with previous/next and check long identifiers, dimensions and barcodes.
Click OK to close configuration. In the print dialog, select a few test pages and 1 copy, then click Print.
Measure the print and test barcodes with the actual scanner before printing the job.
Available data placeholders
- {{ID}}, {{PIECE_NO}}, {{PROJECT}}, {{MATERIAL}}, {{COLOR}}, {{DESCRIPTION}} identify and describe the item.
- {{LENGTH}}, {{WIDTH}}, {{THICKNESS}} and {{UNIT}} provide dimensions; piece length and width use gross dimensions.
- {{STOCK_NO}}, {{STOCK_LENGTH}}, {{STOCK_WIDTH}}, {{STOCK_THICKNESS}} and {{STOCK_SIZE}} describe the source stock.
- {{STACK_SIZE}}, {{RESULT}} and {{DATE}} provide context. DATE uses yyyy-mm-dd.
- {{CODE}} inserts the generated code content; {{PREVIEW}} inserts a generated item preview.
- On offcut labels, PIECE_NO, PROJECT and COLOR are empty; LENGTH and WIDTH describe the offcut. Other values may also be empty when no corresponding data exists.
A small text-label example
At 12 dots/mm, ^PW600 and ^LL360 describe a 50 × 30 mm label. Set that size in label configuration. This example uses the identifier and gross piece dimensions; test the selected font with the characters in your data. For a text placeholder alone inside a ^FD…^FS field, a positive integer modifier such as {{ID:30}} requests the font size in dots.
^XA
^PW600
^LL360
^FO24,24^A0N,30,30^FD{{ID}}^FS
^FO24,72^A0N,24,24^FD{{LENGTH}} x {{WIDTH}} {{UNIT}}^FS
^XZCopy the complete example into a plain-text editor and save as sample-label.zpl. Preserve every brace and command.
Open Print labels for the result and click Configuration. Choose ZPL and select sample-label.zpl on the piece-label page.
On the labels page, set width to 50 mm and height to 30 mm. Click Apply.
This example does not use {{CODE}}, so code-template content is not needed.
Check the piece preview for its identifier and gross dimensions, then click OK.
From the print dialog, print one test label and measure it before using the template for a batch.
Troubleshoot template output
Return to the affected piece or offcut page in label configuration to correct the template-file selection. After editing a template in a text editor, save the file, select it again and Apply the configuration to check the refreshed preview. For a size warning, compare the labels-page width and height with the template and the printer's paper size before printing.
If a template cannot be loaded, reselect a valid file. If the size warning appears, reconcile the template dimensions with label configuration. Check placeholder spelling when literal braces remain visible. A preview is a useful check of rendering; test barcode scanning on the actual printed label.
Short aliases
The templates also accept the following short forms for the named placeholders.
ID$IDPIECE_NO$PNPROJECT$PRMATERIAL$MACOLOR$CODESCRIPTION$DELENGTH$LWIDTH$WTHICKNESS$TUNIT$USTOCK_NO$SNSTOCK_LENGTH$SLSTOCK_WIDTH$SWSTOCK_THICKNESS$STSTOCK_SIZE$SSSTACK_SIZE$SKRESULT$REDATE$DACODE$CDPREVIEW$PV