escpos-php
|
Print connector that passes print data to CUPS print commands. More...
Public Member Functions | |
__construct ($dest) | |
Construct new CUPS print connector. More... | |
__destruct () | |
Cause a NOTICE if deconstructed before the job was printed. | |
finalize () | |
Send job to printer. | |
read ($len) | |
Read data from the printer. More... | |
write ($data) | |
Protected Member Functions | |
getCmdOutput ($cmd) | |
Run a command and throw an exception if it fails, or return the output if it works. More... | |
getLocalPrinters () | |
Load a list of CUPS printers. More... | |
Print connector that passes print data to CUPS print commands.
Your printer mut be installed on the local CUPS instance to use this connector.
Mike42\Escpos\PrintConnectors\CupsPrintConnector::__construct | ( | $dest | ) |
Construct new CUPS print connector.
string | $dest | The CUPS printer name to print to. This must be loaded using a raw driver. |
BadMethodCallException |
|
protected |
Run a command and throw an exception if it fails, or return the output if it works.
(Basically exec() with good error handling)
string | $cmd | Command to run |
|
protected |
Load a list of CUPS printers.
Mike42\Escpos\PrintConnectors\CupsPrintConnector::read | ( | $len | ) |
Read data from the printer.
string | $len | Length of data to read. |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
Mike42\Escpos\PrintConnectors\CupsPrintConnector::write | ( | $data | ) |
string | $data |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.