A simple Linux label maker application for Brother P-touch label printers.
Current version is defined in labelmaker/version.py. The version is displayed in:
- Window title
- stdout on startup
Version numbering follows commits - increment version with each commit.
# System packages (Debian/Ubuntu)
sudo apt install python3-pyqt6 python3-pil
# Or via pip (if in a venv)
pip install PyQt6 pillowpython3 main.pyOn startup, you'll see:
LabelMaker v0.1.0
- Printer Subsystem - Direct USB communication via libusb
- GUI System - GTK4/Cairo framework for pixel-accurate preview
- Brother P-touch P700 (primary target)
- USB VID:PID:
04f9:2061 - Resolution: 180 DPI
- Maximum print width: 128 pixels
- Tape widths: 6mm, 9mm, 12mm, 18mm, 24mm
- USB VID:PID:
| Specification | Value |
|---|---|
| Print Resolution | 180 DPI |
| Max Print Width | 128 pixels |
| Max Label Length | ~300mm (11.8") |
| Print Speed | 30 mm/s |
| Technology | Thermal Transfer |
| Connection | USB |
| Tape Width | Printable Pixels | Margins |
|---|---|---|
| 6mm | 32 px | ~1.0mm |
| 9mm | 52 px | ~1.0mm |
| 12mm | 76 px | ~2.0mm |
| 18mm | 120 px | ~3.0mm |
| 24mm | 128 px | ~3.0mm |
Pros:
- Direct control over the printer
- No CUPS installation required
- Well-documented protocol from existing projects
- Automatic tape width detection
Cons:
- Requires udev rules for non-root access
- Need to handle USB communication directly
Dependencies:
libusb-1.0libgd(for image processing)
Reference implementations:
- ptouch-print - CLI tool with libusb
- ptouch-770 - P700-specific implementation
See PRINTER_SUBSYSTEM.md for complete protocol implementation details.
-
PLite Mode: The P700 may start in "PLite" mode (green LED on). Hold the PLite button for ~2 seconds to switch to standard mode for computer control.
-
Flags Required: PT-P700 requires
RASTER_PACKBITSandP700_INITflags in the protocol. -
Image Requirements: Input images should be:
- 2-color (black and white)
- PNG format preferred
- Width matching tape pixel count
- Height = label length in pixels (length_mm * 180 / 25.4)
- MSPaint-style editor with movable text/image blocks
- Dual-view design: 500% zoomed editor + 1:1 actual-size preview
- Built-in features: Draggable items, selection, undo/redo
- Pixel-perfect: Snap-to-grid, no antialiasing, 1-bit rendering
See GUI_SYSTEM.md for detailed implementation.
- WYSIWYG Preview: Display labels at actual 180 DPI resolution
- Simple Interface: Text input, font selection, basic alignment
- Direct Print: Send raster data directly to printer via libusb
- Pixel-Perfect: What you see is exactly what prints