---
# System prepended metadata

title: MHT-L1081 Thermal Printer Setup on Fedora Linux

---

# MHT-L1081 Thermal Printer Setup on Fedora Linux

**Documentation Date:** April 2026

---

## Overview

The Milestone MHT-L1081 is a 4x6 inch thermal label printer commonly used for shipping labels. While the manufacturer provides drivers for Windows and macOS, there is no official Linux driver. This document explains how to set up direct TSPL (TSC Printer Language) printing on Fedora Linux.

---

## The Problem

The MHT-L1081 identifies itself as a generic USB parallel adapter rather than a standard printer class device:

```
Bus 001 Device 016: ID 0fe6:811e ICS Advent Parallel Adapter
```

This means standard CUPS drivers and auto-detection do not work. The printer uses **TSPL commands** rather than standard PCL, PostScript, or ESC/POS protocols.

---

## The Solution

The printer creates a device node at `/dev/usb/lp0` and accepts raw TSPL commands. The solution involves:

1. Converting PDF shipping labels to bitmap images
2. Wrapping them in TSPL commands
3. Sending directly to the printer device

---

## Prerequisites

Install the required packages:

```bash
sudo dnf install ImageMagick poppler-utils
```

- **ImageMagick** — for image conversion and manipulation
- **poppler-utils** — provides `pdftoppm` for PDF to image conversion

---

## Verifying Printer Connection

### Step 1: Check USB detection

Connect the printer via USB and run:

```bash
lsusb
```

Look for this line:

```
ID 0fe6:811e ICS Advent Parallel Adapter
```

### Step 2: Verify the device node exists

```bash
ls -la /dev/usb/lp0
```

You should see something like:

```
crw-rw---- 1 root lp 180,0 Apr  7 20:25 /dev/usb/lp0
```

### Step 3: Test TSPL communication

Send a test label to confirm the printer speaks TSPL:

```bash
cat << 'EOF' | sudo tee /dev/usb/lp0
SIZE 100 mm, 150 mm
GAP 3 mm, 0 mm
CLS
TEXT 50,50,"3",0,1,1,"Test Label"
PRINT 1
EOF
```

If a label prints with "Test Label" on it, you're good to go!

---

## The Print Script

Create a file called `print_label.sh` in your home directory:

```bash
#!/bin/bash
# Print 4x6 shipping label PDF to MHT-L1081

PDF_FILE="$1"
PRINTER_DEV="/dev/usb/lp0"

if [ -z "$PDF_FILE" ]; then
    echo "Usage: print_label.sh <pdf_file>"
    exit 1
fi

# Convert PDF to PNG at 203 DPI
# 4x6 inches at 203 DPI = 812 x 1218 pixels
TEMP_DIR=$(mktemp -d)
pdftoppm -png -r 203 "$PDF_FILE" "$TEMP_DIR/label"

# Convert to 1-bit BMP for TSPL
convert "$TEMP_DIR/label-1.png" -resize 812x1218! -monochrome "$TEMP_DIR/label.bmp"

# Get image dimensions
WIDTH=$(identify -format "%w" "$TEMP_DIR/label.bmp")
HEIGHT=$(identify -format "%h" "$TEMP_DIR/label.bmp")

# Convert BMP to raw bitmap data (1-bit, no header)
convert "$TEMP_DIR/label.bmp" -depth 1 GRAY:"$TEMP_DIR/label.raw"

# Calculate width in bytes
WIDTH_BYTES=$((($WIDTH + 7) / 8))

# Send TSPL commands - 4x6 inch label
{
    echo "SIZE 4 in, 6 in"
    echo "GAP 3 mm, 0 mm"
    echo "DIRECTION 1"
    echo "CLS"
    echo "BITMAP 0,0,$WIDTH_BYTES,$HEIGHT,0,"
    cat "$TEMP_DIR/label.raw"
    echo ""
    echo "PRINT 1"
} | sudo tee "$PRINTER_DEV" > /dev/null

# Cleanup
rm -rf "$TEMP_DIR"

echo "Label sent to printer!"
```

---

## Usage

To print a shipping label PDF:

```bash
~/print_label.sh /path/to/shipping-label.pdf
```

Example:

```bash
~/print_label.sh ~/Documents/starlink-return-shipping-label.pdf
```

---

## How It Works

1. **PDF to PNG:** `pdftoppm` converts the PDF to a PNG image at 203 DPI (the native resolution of most thermal printers).

2. **Resize:** ImageMagick resizes the image to exactly 812x1218 pixels (4x6 inches at 203 DPI).

3. **Monochrome conversion:** The image is converted to 1-bit monochrome (black and white only) since thermal printers can't print grayscale.

4. **Raw bitmap:** The image is converted to raw bitmap data without headers.

5. **TSPL wrapping:** The bitmap data is wrapped in TSPL commands:
   - `SIZE 4 in, 6 in` — Sets label size
   - `GAP 3 mm, 0 mm` — Sets gap between labels
   - `DIRECTION 1` — Sets print direction
   - `CLS` — Clears the buffer
   - `BITMAP` — Sends the image data
   - `PRINT 1` — Prints one copy

6. **Direct output:** Everything is sent directly to `/dev/usb/lp0`.

---

## TSPL Command Reference

| Command | Description |
|---------|-------------|
| `SIZE w, h` | Set label width and height (in, mm, or dots) |
| `GAP g, o` | Set gap between labels and offset |
| `DIRECTION n` | Print direction (0 or 1) |
| `CLS` | Clear image buffer |
| `BITMAP x,y,w,h,m,data` | Print bitmap at position |
| `TEXT x,y,font,rot,xmul,ymul,"text"` | Print text |
| `PRINT n` | Print n copies |
| `SELFTEST` | Print a self-test page |

---

## Troubleshooting

### Printer not detected

- Check USB cable connection
- Try a different USB port
- Run `dmesg | tail -20` after plugging in to see kernel messages

### Permission denied on /dev/usb/lp0

Add yourself to the `lp` group:

```bash
sudo usermod -aG lp $USER
```

Then log out and back in, or run:

```bash
newgrp lp
```

### Inverted colors (white text on black background)

If colors are inverted, add `-negate` to the convert command:

```bash
convert "$TEMP_DIR/label.bmp" -depth 1 -negate GRAY:"$TEMP_DIR/label.raw"
```

### Image rotated incorrectly

Add rotation to the convert command:

```bash
convert "$TEMP_DIR/label-1.png" -rotate 90 -resize 812x1218! -monochrome "$TEMP_DIR/label.bmp"
```

Use `-rotate 90`, `-rotate 180`, or `-rotate 270` as needed.

### Label size issues

For different label sizes, adjust the `SIZE` command and pixel dimensions:

| Label Size | SIZE Command | Pixels at 203 DPI |
|------------|--------------|-------------------|
| 4x6 inch | `SIZE 4 in, 6 in` | 812 x 1218 |
| 4x4 inch | `SIZE 4 in, 4 in` | 812 x 812 |
| 2x1 inch | `SIZE 2 in, 1 in` | 406 x 203 |

---

## Optional: Avoid sudo

To print without `sudo`, set up proper permissions:

```bash
# Create udev rule
sudo tee /etc/udev/rules.d/99-thermal-printer.rules << 'EOF'
SUBSYSTEM=="usb", ATTR{idVendor}=="0fe6", ATTR{idProduct}=="811e", MODE="0666"
EOF

# Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger
```

Then update the script to remove `sudo`:

```bash
} | tee "$PRINTER_DEV" > /dev/null
```

---

## Summary

The MHT-L1081 works great on Linux once you understand that it needs raw TSPL commands rather than standard printer drivers. The key insight is that it presents itself as a parallel adapter at `/dev/usb/lp0` and accepts TSPL bitmap commands directly.

This solution requires no proprietary drivers and works on any Linux distribution with ImageMagick and poppler-utils installed.