PrinterUtilGetCurrentStatus Method
|
Returns a new instance of PrinterStatus that can be used to determine the status of a printer.
Namespace:
Zebra.Sdk.Printer
Assembly:
SdkApi_Core (in SdkApi_Core.dll) Version: 2.14.1989
Syntax public static PrinterStatus GetCurrentStatus(
Connection printerConnection,
PrinterLanguage language
)
Public Shared Function GetCurrentStatus (
printerConnection As Connection,
language As PrinterLanguage
) As PrinterStatus
public:
static PrinterStatus^ GetCurrentStatus(
Connection^ printerConnection,
PrinterLanguage^ language
)
Parameters
- printerConnection
- Type: Zebra.Sdk.CommConnection
Connection to the printer. - language
- Type: Zebra.Sdk.PrinterPrinterLanguage
Printer control language to be used.
Return Value
Type:
PrinterStatusA new instance of
PrinterStatus.
Exceptions Exception | Condition |
---|
ConnectionException | If there is an issue communicating with the printer (e.g.\u00a0the connection is not
open.) |
Remarks
Each invocation of this method will result in a query of the connected printer. If more than one status value is to be
read, it is recommended that a copy of
PrinterStatus is stored locally.
This method must be invoked again to retrieve the most up-to-date status of the printer. The
PrinterStatus
object will only query the printer upon creation.
Some Mobile printers (including the MZ series printers) will not communicate if the printer is not ready to print.
On these printers, status information is not available when, for example, the printer is out of paper. This method
will throw a
ConnectionException if it is called when the printer cannot communicate.
See Also