@thermal-label/labelwriter-core
v0.6.4
Published
Protocol encoding and device registry for Dymo LabelWriter printers
Maintainers
Readme
@thermal-label/labelwriter-core
Protocol encoding and device registry for Dymo LabelWriter printers.
Note: Most applications should use
@thermal-label/labelwriter-node(Node.js) or@thermal-label/labelwriter-web(browser) instead of importing this package directly.
Install
pnpm add @thermal-label/labelwriter-coreRequirements
- Node.js >= 20.9.0 (Node 24 LTS recommended) — or any modern browser
Key Exports
Device Registry
import { DEVICES, findDevice } from '@thermal-label/labelwriter-core';
const device = findDevice(0x0922, 0x0020); // LabelWriter 450
console.log(device?.name); // 'LabelWriter 450'
// All known devices
console.log(Object.keys(DEVICES));Protocol Encoding
import { encodeLabel, buildErrorRecovery } from '@thermal-label/labelwriter-core';
const bytes = encodeLabel(device, bitmap, { density: 'normal', mode: 'text' });
const recovery = buildErrorRecovery();Bitmap Helpers (re-exported from @mbtech-nl/bitmap)
import {
renderText,
renderImage,
rotateBitmap,
padBitmap,
scaleBitmap,
} from '@thermal-label/labelwriter-core';Types
interface DeviceDescriptor {
name: string;
vid: number;
pid: number;
headDots: number; // 672 or 1248
bytesPerRow: number; // headDots / 8 = 84 or 156
protocol: '450' | '550';
network: 'none' | 'wifi' | 'wired';
nfcLock: boolean; // 550 series — genuine labels only
}
interface PrintOptions {
density?: 'light' | 'medium' | 'normal' | 'high';
mode?: 'text' | 'graphics';
compress?: boolean;
copies?: number;
roll?: 0 | 1; // Twin Turbo only
jobId?: number; // 550 protocol — auto-generated if omitted
}Protocol Generations
The protocol generation is detected automatically from the DeviceDescriptor:
- 450 series (
protocol: '450'): no job header, simple ESC/raster stream - 550 series (
protocol: '550'): mandatoryESC sjob header before raster data
The 550 series NFC lock cannot be bypassed — the printer hardware enforces it. See HARDWARE.md for details.
Links
Supported hardware
22 devices — 4 verified · 0 partial · 13 expected · 0 unsupported · 5 unverified
| Model | Key | USB PID | Transports | Status |
| --- | --- | --- | --- | --- |
| LabelWriter 4XL | LW_4XL | 0x001f | USB | 🔄 expected |
| LabelWriter 5XL | LW_5XL | 0x002a | USB, TCP | 🔄 expected |
| LabelWriter 300 | LW_300 | 0x0009 | USB, Serial | 🔄 expected |
| LabelWriter 310 | LW_310 | 0x0009 | USB, Serial | 🔄 expected |
| LabelWriter 330 | LW_330 | 0x0007 | USB, Serial | 🔄 expected |
| LabelWriter 330 Turbo | LW_330_TURBO | 0x0008 | USB, Serial | ✅ verified |
| LabelWriter 400 | LW_400 | 0x0019 | USB | ✅ verified |
| LabelWriter 400 Turbo | LW_400_TURBO | 0x001a | USB | 🔄 expected |
| LabelWriter 450 | LW_450 | 0x0020 | USB | 🔄 expected |
| LabelWriter 450 Duo | LW_450_DUO | 0x0023 | USB | 🔄 expected |
| LabelWriter 450 Turbo | LW_450_TURBO | 0x0021 | USB | 🔄 expected |
| LabelWriter 450 Twin Turbo | LW_450_TWIN_TURBO | 0x0022 | USB | ⏳ unverified |
| LabelWriter 550 | LW_550 | 0x0028 | USB | ✅ verified |
| LabelWriter 550 Turbo | LW_550_TURBO | 0x0029 | USB, TCP | 🔄 expected |
| LabelWriter Duo - 96 | LW_DUO_96 | 0x0017 | USB | 🔄 expected |
| LabelWriter Duo - 128 | LW_DUO_128 | 0x001d | USB | ✅ verified |
| LabelWriter EL40 | LW_EL40 | — | Serial | ⏳ unverified |
| LabelWriter EL60 | LW_EL60 | — | Serial | ⏳ unverified |
| LabelWriter SE450 | LW_SE450 | 0x0400 | USB, Serial | 🔄 expected |
| LabelWriter Turbo | LW_TURBO | — | Serial | ⏳ unverified |
| LabelWriter Twin Turbo | LW_TWIN_TURBO | 0x0018 | USB | ⏳ unverified |
| LabelWriter Wireless | LW_WIRELESS | 0x0031 | 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.
License
MIT — Copyright (c) 2026 Mannes Brak
