Interface: PrinterDiscovery
Interface for discovering available printers.
Each driver implements this for its supported transports. A unified CLI can aggregate implementations across all installed driver packages to auto-detect printers regardless of family.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
family | readonly | string | Driver family identifier — matches DeviceEntry.family. |
Methods
listMedia()?
optional listMedia(): readonly MediaDescriptor[];The driver's media registry, for callers that must let a user pick media by id or name instead of relying on getStatus().detectedMedia (a CLI --media flag; network printers whose media cannot be detected). Optional: drivers without a media catalog omit it, and callers report driver <family> does not expose a media catalog. (Code span on purpose: typedoc emits the text raw and VitePress reads a bare <family> as an unclosed element.)
Returns
readonly MediaDescriptor[]
listPrinters()
listPrinters(): Promise<DiscoveredPrinter[]>;List connected printers on this driver's supported transports.
Returns
Promise<DiscoveredPrinter[]>
openPrinter()
openPrinter(options?: OpenOptions): Promise<PrinterAdapter>;Open a printer matching the given options.
If no options are provided, opens the first available printer.
Parameters
| Parameter | Type |
|---|---|
options? | OpenOptions |
Returns
Promise<PrinterAdapter>