An interface used to obtain various properties of a Zebra printer.
Namespace:
ZSDK_API.PrinterAssembly: ZSDK_API (in ZSDK_API.dll) Version: 1.1.123.0
Syntax
C# |
---|
public interface ZebraPrinter |
Visual Basic (Declaration) |
---|
Public Interface ZebraPrinter |
Examples
How to create an instance of a ZebraPrinter.
CopyC#
using ZSDK_API.Comm; using ZSDK_API.Printer; using ZSDK_API.ApiException; try { ZebraPrinterConnection printerConnection = new TcpPrinterConnection("192.168.1.100", TcpPrinterConnection.DEFAULT_ZPL_TCP_PORT); printerConnection.Open(); ZebraPrinter zPrinter = ZebraPrinterFactory.GetInstance(printerConnection); PrinterLanguage pcLanguage = zPrinter.GetPrinterControlLanguage(); String printerLanguageMessage = "Printer Control Language is " + pcLanguage; printerConnection.Close(); } catch (ZebraPrinterConnectionException e) { Console.Write(e.StackTrace); }
CopyVB.NET
Imports ZSDK_API.Comm Imports ZSDK_API.Printer Imports ZSDK_API.ApiException Try Dim printerConnection As ZebraPrinterConnection = New TcpPrinterConnection("192.168.1.100", TcpPrinterConnection.DEFAULT_ZPL_TCP_PORT) printerConnection.Open() Dim zPrinter As ZebraPrinter = ZebraPrinterFactory.GetInstance(printerConnection) Dim pcLanguage As PrinterLanguage = zPrinter.GetPrinterControlLanguage() Dim printerLanguageMessage As [String] = "Printer Control Language is " & pcLanguage.ToString printerConnection.Close() Catch e As ZebraPrinterConnectionException Console.Write(e.StackTrace) End Try