.Net (C#) calling the LabelSoft label editing software to preview and print barcode labels

No need to understand complicated dll functions; calling the LabelSoft software to preview and print labels

is the simplest way to integrate barcode/RFID label printing into an existing system.

Download sample source code: /downloads/sdk-all/

Usage steps: 1. Connect the ZMIN label printer to the computer;

2. Run the LabelSoft label editing software and lay out the label according to its actual size; the figure below takes a 55X20mm label as an example:

3. Name the variables in the label that need to be changed by passed values. For example, in the sample, the file number and the QR code share the same data,

and their values need to change during printing, so set both of their shared names to: v1. Note: shared names can be

customized; English letters plus numbers are recommended. If multiple variables need to be modified, set them to v1, v2, v3… respectively.

For the data type, generally choose constant or serial number; do not choose input at print time.

4. After the layout is complete, print from LabelSoft; if the output is normal, save the label,

for example, save it as: demo.lsf;

5. In C#, call an external program to pass parameters to LabelSoft.exe, achieving

preview and print output of the label file.

Main code:

private string Run_LabelSoft_Command(string argument)//Run LabelSoft with an argument { try { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.FileName = Application.StartupPath + "\\LabelSoft.exe";//Name of the program to start p.StartInfo.Arguments = argument;//Startup argument p.Start();//Start p.WaitForExit();//Block until LabelSoft exits return "success";// p.StandardOutput.ReadToEnd(); } catch (Exception ex) { return ex.Message; } }

6. Print output result:

Download sample source code: /downloads/sdk-all/