Question : ZM 400 Label Printing

I am trying to code in Delphi so that my system can print out label accordingly.  However I have no clue on how to tell the system about the label size, besides I am trying to print label parrallel, meaning two labels at one row.  Does anyone have any sample code for ZM label printing ?

Answer : ZM 400 Label Printing

if you mean printing the barcode next to the name, then you are missing the barcode field value in your example. You would have to calculate the right position as well. Maybe use the right aligment to put it, or use ^FT command . from manual, in the ^FT command :
"When a coordinate is missing, the position following the last formatted field is assumed. This
remembering simplifies field positioning with respect to other fields. Once the first field is
positioned, other fields follow automatically."

You might want also to pad your labels with spaces using Delphi Format with '%-20s' for example (will right align the text, padded with spaces on the right up to 20 chars)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Procedure PrintLabel(ProductName:String);
Var
 Cmd:TStringList;
begin
 Cmd:=TStringList.Create;
 Cmd.Add('^XA^LH0,0');
 Cmd.Add(Format('^FT0,0^FD%-30s^FS',[ProductName]));
 Cmd.Add(Format('^FT^B3^FD%s^FS',[ProductName]));
 Cmd.Add('^XZ');
 SendCommand(Cmd.Text);
 Cmd.Free;
end;
Random Solutions  
 
programming4us programming4us