1 Reply Latest reply on Nov 29, 2017 9:33 AM by Robin West

    Is there a way to capture the size of a label in a zebra printer.

    Robert Thompson

      Hi I need to be able to capture the size of the label in a printer.  I would like to notify the user that the label that is being sent needs to be changed if the label is not the correct size. Ex:  If I am sending a 4x2 and the label printer has a 6x4. Do not print and send an error message. If there away in doing this using the zebra.sdk.printer. The below example code is working great for me.   public static void Main(string[] args) {         Connection connection = new TcpConnection("192.168.1.100", TcpConnection.DEFAULT_ZPL_TCP_PORT);         try {             connection.Open();             ZebraPrinter printer = ZebraPrinterFactory.GetInstance(connection);             PrinterStatus printerStatus = printer.GetCurrentStatus();             if (printerStatus.isReadyToPrint) {                 Console.WriteLine("Ready To Print");             } else if (printerStatus.isPaused) {                 Console.WriteLine("Cannot Print because the printer is paused.");             } else if (printerStatus.isHeadOpen) {                 Console.WriteLine("Cannot Print because the printer head is open.");             } else if (printerStatus.isPaperOut) {                 Console.WriteLine("Cannot Print because the paper is out.");             } else {                 Console.WriteLine("Cannot Print.");             }         } catch (ConnectionException e) {             Console.WriteLine(e.ToString());         } catch (ZebraPrinterLanguageUnknownException e) {             Console.WriteLine(e.ToString());         } finally {             connection.Close();         }     }