Click or drag to resize

ZebraPrinter Interface

An interface used to obtain various properties of a Zebra printer.

Namespace:  Zebra.Sdk.Printer
Assembly:  SdkApi_Core (in SdkApi_Core.dll) Version: 2.14.1869
Syntax
public interface ZebraPrinter : FileUtil, 
	GraphicsUtil, FormatUtil, ToolsUtil

The ZebraPrinter type exposes the following members.

Properties
  NameDescription
Public propertyConnection
Returns the printer's connection.
Public propertyPrinterControlLanguage
Returns the printer control language (e.g. ZPL or CPCL) of the printer.
Top
Methods
  NameDescription
Public methodCalibrate
Sends the appropriate calibrate command to the printer.
(Inherited from ToolsUtil.)
Public methodGetCurrentStatus
Returns a new instance of PrinterStatus that can be used to determine the status of a printer.
Public methodGetVariableFields
Returns a list of descriptors of the variable fields in this format.
(Inherited from FormatUtil.)
Public methodPrintConfigurationLabel
Sends the appropriate print configuration command to the printer.
(Inherited from ToolsUtil.)
Public methodPrintImage(String, Int32, Int32)
Prints an image from the connecting device file system to the connected device as a monochrome image.
(Inherited from GraphicsUtil.)
Public methodPrintImage(String, Int32, Int32, Int32, Int32, Boolean)
Prints an image from the connecting device file system to the connected device as a monochrome image.
(Inherited from GraphicsUtil.)
Public methodPrintImage(ZebraImageI, Int32, Int32, Int32, Int32, Boolean)
Prints an image to the connected device as a monochrome image.
(Inherited from GraphicsUtil.)
Public methodPrintStoredFormat(String, DictionaryInt32, String)
Prints a stored format on the printer, filling in the fields specified by the Dictionary.
(Inherited from FormatUtil.)
Public methodPrintStoredFormat(String, String)
Prints a stored format on the printer, filling in the fields specified by the array.
(Inherited from FormatUtil.)
Public methodPrintStoredFormat(String, DictionaryInt32, String, String)
Prints a stored format on the printer, filling in the fields specified by the Dictionary.
(Inherited from FormatUtil.)
Public methodPrintStoredFormat(String, String, String)
Prints a stored format on the printer, filling in the fields specified by the array.
(Inherited from FormatUtil.)
Public methodCode exampleReset
Sends the appropriate reset command to the printer.
(Inherited from ToolsUtil.)
Public methodRestoreDefaults
Sends the appropriate restore defaults command to the printer.
(Inherited from ToolsUtil.)
Public methodRetrieveFileNames
Retrieves the names of the files which are stored on the device.
(Inherited from FileUtil.)
Public methodRetrieveFileNames(String)
Retrieves the names of the files which are stored on the device.
(Inherited from FileUtil.)
Public methodRetrieveFormatFromPrinter(String)
Retrieves a format from the printer.
(Inherited from FormatUtil.)
Public methodRetrieveFormatFromPrinter(Stream, String)
Retrieves a format from the printer.
(Inherited from FormatUtil.)
Public methodRetrieveObjectsProperties
Retrieves the properties of the objects which are stored on the device.
(Inherited from FileUtil.)
Public methodSendCommand(String)
Converts the specified command to bytes using the default charset and sends the bytes to the printer.
(Inherited from ToolsUtil.)
Public methodSendCommand(String, String)
Converts the specified command to bytes using the specified charset "encoding" and sends the bytes to the printer.
(Inherited from ToolsUtil.)
Public methodSendFileContents(String)
Sends the contents of a file to the device.
(Inherited from FileUtil.)
Public methodSendFileContents(String, ProgressMonitor)
Sends the contents of a file to the device.
(Inherited from FileUtil.)
Public methodSetConnection
Changes the printer's connection.
Public methodStoreImage(String, String, Int32, Int32)
Stores the specified image to the connected printer as a monochrome image.
(Inherited from GraphicsUtil.)
Public methodStoreImage(String, ZebraImageI, Int32, Int32)
Stores the specified image to the connected printer as a monochrome image.
(Inherited from GraphicsUtil.)
Top
Examples
using System;
using Zebra.Sdk.Comm;
using Zebra.Sdk.Printer;

public class ZebraPrinterExample {

    public static void Main(string[] args) {
        Connection connection = new TcpConnection("10.0.1.18", TcpConnection.DEFAULT_ZPL_TCP_PORT);
        try {
            connection.Open();
            ZebraPrinter zPrinter = ZebraPrinterFactory.GetInstance(connection);
            PrinterLanguage pcLanguage = zPrinter.PrinterControlLanguage;
            Console.WriteLine($"Printer Control Language is {pcLanguage}");
        } catch (ConnectionException e) {
            Console.WriteLine(e.ToString());
        } catch (ZebraPrinterLanguageUnknownException e) {
            Console.WriteLine(e.ToString());
        } finally {
            connection.Close();
        }
    }
}
See Also