- Usage
You can send ZPL code to your local or network Zebra printers. Use print ZPL codes only! Example usage:
using ZplPrintHelper;
namespace ZplPrintDemo
{
internal class Program
{
static void Main(string[] args)
{
string zplCode = "^XA^FO50,50^ADN,36,20^FDHello Zebra!^FS^XZ";
string printerName = "GK420d";
string docName = "Zebra Print";
//Send ZPL to your local printer. 3. parameter is optional, default value is "Zebra Print"
//Return value true -> print success else false
ZplPrint.SendZplToLocalPrinter(printerName, zplCode, docName);
//Test connection. The second and third parameter is optional, defaults : 9100 (Default ports of Zebra printers) and 2000 (Timeout value 2 sec.)
// return true if the connection success.
ZplPrint.TestTcpConnection("127.0.0.5", 9100, 2000);
//Send ZPL to your network printer. 3. parameter is optional, defaults : 9100 (Default ports of Zebra printers)
// retun true is the print was success
ZplPrint.SendZplToNetworkPrinter("127.0.0.5", zplCode, 9100);
}
}
}