@thermal-label/brother-ql-core
v0.6.1
Published
Protocol encoding, device registry, and media registry for Brother QL label printers
Downloads
1,036
Maintainers
Readme
@thermal-label/brother-ql-core
Protocol encoder, device registry, and media registry for Brother
QL label printers (DK paper labels) and PT-P / PT-E label
printers (TZe laminated tape + HSe heat-shrink). Both families share
the raster command set — the encoder branches on engine.protocol
(ql-raster vs pt-raster).
Consumers rarely import this package directly. Use one of the runtime packages instead:
@thermal-label/brother-ql-node— Node.js (USB + TCP).@thermal-label/brother-ql-web— browser (WebUSB).
Install
pnpm add @thermal-label/brother-ql-coreQuick start
import { encodeJob, findDevice, findMedia, renderText } from '@thermal-label/brother-ql-core';
const device = findDevice(0x04f9, 0x209d);
if (!device) throw new Error('Unknown Brother device');
const media = findMedia('dk-22205')!;
const bitmap = renderText('Hello QL', { mediaWidth: media.printableWidthDots });
const bytes = encodeJob([{ bitmap }], { engine: device.engines[0], media });bytes is a contiguous Uint8Array the transport ships unchanged.
What's inside
encodeJob(pages, options)— encode a complete print job to a byte stream.parseStatus(bytes)+STATUS_REQUEST— status decoder + request frame.DEVICES/findDevice/getUsbIds/isMassStorageMode.MEDIA/findMedia— DK label + TZe / HSe tape registry.- Bitmap renderers re-exported from
@mbtech-nl/bitmap.
Requirements
- Node.js
>=20.9.0(Node 24 LTS recommended). - Runs in browser and Node.js — no Node.js built-ins.
Documentation
https://thermal-label.github.io/brother-ql/core
License
MIT
Supported hardware
24 devices — 3 verified · 0 partial · 15 expected · 0 unsupported · 6 unverified
| Model | Key | USB PID | Transports | Status |
| ---------------------------------------------------------------------------- | ------------ | ------- | ---------------- | ------------- |
| PT-E550W | PT_E550W | 0x2060 | USB, TCP | ⏳ unverified |
| PT-P750W | PT_P750W | 0x2062 | USB, TCP | ⏳ unverified |
| PT-P900 | PT_P900 | 0x2083 | USB | ⏳ unverified |
| PT-P900W | PT_P900W | 0x2085 | USB, TCP | ⏳ unverified |
| PT-P910BT | PT_P910BT | 0x20c7 | USB, BT SPP | ⏳ unverified |
| PT-P950NW | PT_P950NW | 0x2086 | USB, TCP | ⏳ unverified |
| QL-500 | QL_500 | 0x2013 | USB | 🔄 expected |
| QL-550 | QL_550 | 0x2016 | USB | 🔄 expected |
| QL-560 | QL_560 | 0x2018 | USB | 🔄 expected |
| QL-570 | QL_570 | 0x2019 | USB | 🔄 expected |
| QL-580N | QL_580N | 0x201b | USB, TCP | 🔄 expected |
| QL-600 | QL_600 | 0x2100 | USB | 🔄 expected |
| QL-650TD | QL_650TD | 0x201c | USB | 🔄 expected |
| QL-700 | QL_700 | 0x2042 | USB | ✅ verified |
| QL-710W | QL_710W | 0x2044 | USB, TCP | 🔄 expected |
| QL-720NW | QL_720NW | 0x2045 | USB, TCP | 🔄 expected |
| QL-800 | QL_800 | 0x209b | USB | ✅ verified |
| QL-810W | QL_810W | 0x209c | USB, TCP | 🔄 expected |
| QL-820NWBc | QL_820NWBc | 0x209d | USB, TCP, BT SPP | ✅ verified |
| QL-1050 | QL_1050 | 0x2027 | USB | 🔄 expected |
| QL-1060N | QL_1060N | 0x2028 | USB, TCP | 🔄 expected |
| QL-1100 | QL_1100 | 0x20a7 | USB | 🔄 expected |
| QL-1110NWB | QL_1110NWB | 0x20a8 | USB, TCP | 🔄 expected |
| QL-1115NWB | QL_1115NWB | 0x20ab | USB, TCP | 🔄 expected |
Click any model to open its detail page on the docs site, where engines, supported media, and verification reports live. The same data backs the interactive cross-driver table.
