laravel-printing

Basic Usage

Printer

Each printer object returned from a Driver should be an implementation of Rawilk\Printing\Contracts\Printer. A printer represents a physical printer on your print server.

Rawilk\Printing\Contracts\Printer


string|int

A print server typically assigns some kind of id or uri for a printer. For example, CUPS will return the uri to the printer.


?string

If reported by the driver, the printer's name.


?string

If reported by the driver, a brief description of the printer.


array

If reported by the driver, this should be an array of the printer's capabilities (e.g., trays, collation, etc.)


array

If your printer and print driver support it, you can get a listing of your printer's available trays for use later.


string

The printer's current reported status.


bool

Indicates if the printer has reported itself to be online.


The printer object can also be cast to array or json, and it will return the following info:

  • id
  • name
  • description
  • online
  • status
  • trays (If supported by the driver)
  • capabilities (If supported by the driver)

{note} Some drivers may serialize this slightly different.

Previous
Basic Usage