Enum Class PrinterLanguage

Object
Enum<PrinterLanguage>
com.zebra.sdk.printer.PrinterLanguage
All Implemented Interfaces:
Serializable, Comparable<PrinterLanguage>, Constable

public enum PrinterLanguage extends Enum<PrinterLanguage>
Enumeration of the various printer control languages supported by Zebra Printers.
  • Enum Constant Details

    • ZPL

      public static final PrinterLanguage ZPL
      Printer control language ZPL
    • CPCL

      public static final PrinterLanguage CPCL
      Printer control language CPCL
    • LINE_PRINT

      public static final PrinterLanguage LINE_PRINT
      Printer control language line_print mode.
  • Method Details

    • values

      public static PrinterLanguage[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PrinterLanguage valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getLanguage

      public static PrinterLanguage getLanguage(String name) throws ZebraPrinterLanguageUnknownException
      Converts the string name to the appropriate enum value. The name parameter accepts the value returned from the printer's 'device.langauges' SGD.
      Parameters:
      name - printer control language name (e.g. "zpl", "cpcl", or "line_print")
      Returns:
      the printer language
      Throws:
      ZebraPrinterLanguageUnknownException - if the printer language cannot be determined
    • toString

      public String toString()
      The name of the printer language - (e.g. "ZPL" or "CPCL").
      Overrides:
      toString in class Enum<PrinterLanguage>
      See Also: