Home Contents | # rawio:lpstatus | Rawio | Core4 Lua Event System

## SYNOPSIS

status [, flags] = handle:lpstatus()

## DESCRIPTION

Reports the status of a printer device.

The returned status value contains the printer status in a format compatible with the status register of a standard PC parallel port. The following bits are contained in the status:

7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
--- | --- | --- | --- | --- | --- | --- | ---
Reserved | Paper Empty | Select | Not Error | Reserved

Some printers have a vendor specific status word. When supported by the driver, this is returned as a second value. The format of the status word depends on the printer model. Check with rawio:usbInfo() which printer model is attached before using this data.

## RETURN VALUE

On success, returns a status and possibly a flags value. On error, returns nil. In case of an error, the error can be retrieved using rawio:lastError().

## SEE ALSO

rawio:usbInfo