To achieve a similar workflow with the
Zebra ZD421 as you have with the Brother QL-800, you’ll need to transition from working with proprietary label design files (like the .lbx file) to Zebra’s own label design and printing solutions.
- ZebraDesigner Software:
First, use Zebra's ZebraDesigner software to create and design your label templates. ZebraDesigner allows you to design labels with text, barcodes, and images. Once you have the design, you can save the template as a ZPL (Zebra Programming Language) file, which is used for printing on Zebra printers like the ZD421.
- Zebra SDK:
Zebra provides an SDK for C# (Zebra .NET SDK) that allows you to communicate with the printer directly. The SDK can send ZPL commands to the printer, including the label template and data that you want to populate.
- Workflow:
- Design your label in ZebraDesigner.
- Save the template as a ZPL file.
- In your C# code, you can load the ZPL template file and send the necessary data to replace placeholders in the ZPL script. This can be done using Zebra .NET SDK or by directly sending the ZPL commands to the printer.
- Zebra Printer Communication:
You can use Zebra's SDK or Raw Printing methods to send the ZPL commands. The Zebra .NET SDK offers various APIs to interact with the printer and manage the print queue.
For example, the code might look something like this:
using Zebra.Sdk.Comm;
using Zebra.Sdk.Printer;
PrinterConnection connection = new TcpConnection("printer_ip_address", TcpConnection.DEFAULT_ZPL_TCP_PORT);
connection.Open();
string zplData = File.ReadAllText("path_to_your_zpl_template.zpl");
string filledZplData = zplData.Replace("{{DataPlaceholder}}", "YourDynamicData");
connection.Write(Encoding.UTF8.GetBytes(filledZplData));
connection.Close();
This will send your customized ZPL command to the printer for it to print the label.