Skip to content

Interface: OpenOptions

Options for PrinterDiscovery.openPrinter().

Leave empty to open the first available printer. Provide one or more fields to narrow the match.

Properties

PropertyTypeDescription
baudRate?numberSerial baud rate. Default 9600. Ignored for RFCOMM / Bluetooth SPP (the underlying link handles flow control) but required by the serialport and Web Serial APIs.
deviceKey?stringRegistry key of the device descriptor to use. Required by drivers when the transport carries no model signal (serial / RFCOMM); ignored when the transport enumerates (USB / TCP / mDNS). Each driver matches the key against its own registry — pass 'LW_330' to the labelwriter driver, 'QL_820NWB' to the Brother driver, etc. Unknown keys behave like any other "no match" — openPrinter throws.
host?stringTCP host (IP or hostname).
pid?numberMatch by USB Product ID.
port?numberTCP port. Default 9100.
serialNumber?stringMatch by USB / mDNS serial number.
serialPath?stringSerial port path. Examples: /dev/rfcomm0 (Linux, Bluetooth SPP), /dev/ttyUSB0 (Linux, USB-serial adapter), COM3 (Windows).
vid?numberMatch by USB Vendor ID.