laravel-printing
Cups
Printer Service
On this page
Introduction
The PrinterService
can be used to fetch printers installed on your CUPS server.
All methods are callable from the CupsClient
class.
$printers = $client->printers->all();
See the API Overview for more information on interacting with the PrintNode API.
Reference
Methods
all
Collection<int, Rawilk\Printing\Api\Cups\Resources\Printer>
Retrieve all printers associated installed on the CUPS server.
param | type | default |
---|---|---|
$params |
array|null | null |
$opts |
null|array|RequestOptions | null |
retrieve
Retrieve a printer from the server.
Rawilk\Printing\Api\Cups\Resources\Printer
param | type | default | description |
---|---|---|---|
$uri |
string | The printer's uri | |
$params |
array|null | null | Unused for now |
$opts |
null|array|RequestOptions | null |
printJobs
Collection<int, Rawilk\Printing\Api\Cups\Resources\PrintJob>
Retrieve all print jobs for a given printer.
param | type | default | description |
---|---|---|---|
$parentUri |
string | The printer's uri | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
Printer Resource
Rawilk\Printing\Api\Cups\Resources\Printer
A Printer
represents a Printer installed on a CUPS server.
Properties
uri
string
The printer's uri. Alias to $printerUriSupported
.
printerUriSupported
string
The printer's uri.
printerState
int
An integer representation of the printer's status.
printerName
string
The name of the printer.
mediaSourceSupported
array
The media (trays) the printer supports.
printerInfo
?string
A description of the printer, if provided.
printerStateReasons
array
A more detailed list of the printer's status.
Methods
capabilities
array
Returns an array of the printer's capabilities.
state
?Rawilk\Printing\Api\Cups\Enums\PrinterState
Returns an enum representing the printer's current state.
stateReasons
Collection<int, Rawilk\Printing\Api\Cups\Enums\PrinterStateReason>
If any reasons are provided for the printer's state, this will return a collection of enums that represent the reason for the printer's state.
isOnline
bool
Indicates if the printer is considered to be online.
trays
array
Returns an array of the printer's reported trays.