Description

Loftware does not support the ability to print datamatrix symbols with cell heights of more than 20 pixels, but the printer supports this natively.

Creating a label with a Datamatrix symbol and attempt to set the Cell Height to a value greater than 20. The Cell Height is automatically reset to 20.

The solution is to design a label combining the use of field level scripting and ZPL or IPL pass through.

Requirements

A printer that supports native printing of Datamatrix barcodes in IPL or ZPL language.

How to Create a Datamatrix symbol with cell height greater than 20 pixels

Create a label with 5 text fields.

Field 1: This field must be named with a "pfield" prefix that designates this field as a Printer Language Pass Through field (Name: ptfield1)

Note: The pass through field can be any variable field. I chose to use a datamatrix symbol in this case to make the intention of the pass through clear.

Field 2: This field will accept the data to be encoded in the datamatrix symbol (Name: Input)

Field 3: This field will accept the location in pixels of the symbology (Name: Location)

Field 4: This field will accept the size in pixels of the datamatrix cells (Name: CellHeight)

Field 5: This is the script field.

ZPL Script Example:

// Original Print to File ^FO70,115^BXN,20,200,0,0,6,_ ^FV12345678901234567890123456789012345678901234567890^FS 

Go to Online ZPL Viewer to view the above ZPL print stream

var cellHeight = String(label.fields.field.(@name=='CellHeight').@data);
var input = String(label.fields.field.(@name=='Input').@data);
var loc = String(label.fields.field.(@name=='Location').@data); 
var output = "^FO" + loc + "^BXN," + cellHeight + ",200,0,0,6,_^FV" + input + "^FS"; 
label.fields.field.(@name=='ptfield1').@data = output;

IPL Script Example:

// Original Print to File: <STX>B0,datamatr;o2300,100;f3;h20;w20;i0;c17,200,0,0,0,1,1;d3,ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX;D39;<ETX>

Please note the field origin coordinate system for Intermec is rotated 90 degrees

var cellHeight = String(label.fields.field.(@name=='CellHeight').@data);
var input = String(label.fields.field.(@name=='Input').@data);
var loc = String(label.fields.field.(@name=='Location').@data); 
var output = "<STX>B0,ptfield1;o" + loc + ";f3;h20;w" + 
cellHeight + ";i0;c17,200,0,0,0,1,1;d3," + input + ";D39;<ETX>"; 
label.fields.field.(@name=='ptfield1').@data = output;

Result

The label produced will have a datamatrix barcode of the size, location, and data specified during data entry.

 

Note: Print Preview, and Design will NOT properly represent the output in this situation.

Related Articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Article Number

See Using the Knowledge Base for information on how to the indicate the status of an article using the Status macro.

Versions

Loftware version 10.x and higher

 

Environment

Any Supported Loftware Environment

 

Rate

 

This table provides information that is visible only to Loftware users.

Linked Jira
Incident Number 
Author Michael Alley
Review Date