Skip to content

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 ​

PropertyModifierTypeDescription
familyreadonlystringDriver family identifier — matches DeviceEntry.family.

Methods ​

listMedia()? ​

ts
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() ​

ts
listPrinters(): Promise<DiscoveredPrinter[]>;

List connected printers on this driver's supported transports.

Returns ​

Promise<DiscoveredPrinter[]>


openPrinter() ​

ts
openPrinter(options?: OpenOptions): Promise<PrinterAdapter>;

Open a printer matching the given options.

If no options are provided, opens the first available printer.

Parameters ​

ParameterType
options?OpenOptions

Returns ​

Promise<PrinterAdapter>