Skip to content

labelwriter


labelwriter / web/src / fromUSBDevice

Function: fromUSBDevice()

fromUSBDevice(usbDevice): Promise<WebLabelWriterPrinter>

Wrap an already-selected USBDevice (e.g. from navigator.usb.getDevices()) and return the primary engine's adapter. The primary is the first lw-* engine on the device, or the first drivable engine if none speak lw-*.

Parameters

usbDevice

USBDevice

Returns

Promise<WebLabelWriterPrinter>

Throws

when the VID/PID is not in the LabelWriter registry.

Deprecated

Use requestPrinters({ transport: 'usb' }) from ./request-printers.ts. Removed once consumers migrate (plan 11).