Phomymo is a toolkit for interfacing with Phomemo thermal label printers. It includes:
- Web Label Designer - A browser-based visual editor for creating and printing labels
- CLI Tool - A command-line tool for batch printing images
Supports Phomemo M110, M200, M220, M221, M260, D30, D110, and similar thermal printers.
A full-featured label designer that runs in your browser using Web Bluetooth (no drivers needed).
Try it now: https://phomymo.affordablemagic.net
- Text - Multiple fonts, sizes, bold, italic, underline, horizontal and vertical alignment, background colors
- Images - Import with scale control and aspect ratio lock
- Barcodes - Code128, EAN-13, UPC-A, Code39 formats
- QR Codes - Automatic sizing and encoding
- Shapes - Rectangle, ellipse, triangle, and line with fill options
- Solid black/white fills
- 9 dithered grayscale levels (6%, 12%, 25%, 37%, 50%, 62%, 75%, 87%, 94%)
- Stroke options with adjustable width
- Rounded corners for rectangles
- Visual editing - Drag to move, resize handles on corners/edges, rotation handle
- Multi-select - Shift+click to select multiple elements
- Grouping - Group elements together (Ctrl/Cmd+G), ungroup (Ctrl/Cmd+Shift+G)
- Undo/Redo - Full history support (Ctrl/Cmd+Z to undo, Ctrl/Cmd+Shift+Z to redo)
- Keyboard shortcuts - Arrow keys to nudge, Delete to remove, Ctrl/Cmd+D to duplicate
- Layer ordering - Raise/lower elements in z-order
- Variable fields - Use
{{FieldName}}syntax in text, barcodes, and QR codes - CSV import - Load data from spreadsheet exports
- Manual data entry - Add/edit records in a table interface
- Preview grid - See all labels before printing with click-to-enlarge
- Batch printing - Print multiple labels with progress indicator and cancel support
- Common presets: 12x12, 12x22, 12x40, 14x25, 15x30, 20x30, 25x50, 30x20, 40x30, 40x60, 50x30, 50x50, 50x80, 60x40
- Custom dimensions with live preview
- Save/Load - Persist designs to browser localStorage
- Export/Import - Share designs as JSON files
- Print settings - Density control, multiple copies, feed adjustment
Option 1: Use the live version
- Open https://phomymo.affordablemagic.net in Chrome
- Click Connect to pair with your Phomemo printer via Bluetooth
- Design your label and click Print
Option 2: Run locally
- Serve the web app (Web Bluetooth requires HTTPS or localhost):
cd src/web python3 -m http.server 8080 - Open http://localhost:8080 in Chrome (or another Chromium-based browser)
- Connect, design, and print
| Shortcut | Action |
|---|---|
Ctrl/Cmd + Z |
Undo |
Ctrl/Cmd + Shift + Z |
Redo |
Ctrl/Cmd + D |
Duplicate selected |
Ctrl/Cmd + G |
Group selected |
Ctrl/Cmd + Shift + G |
Ungroup |
Delete / Backspace |
Delete selected |
Arrow keys |
Nudge by 1px |
Shift + Arrow keys |
Nudge by 10px |
Shift + Click |
Add to selection |
- Chrome, Edge, or another Chromium-based browser
- Web Bluetooth API support (not available in Firefox or Safari)
- HTTPS or localhost
When the Bluetooth device picker appears, select the device showing a signal strength indicator. Devices listed without signal strength may be cached/ghost entries that won't connect properly.
A Node.js command-line tool for printing images via USB.
-
Clone the repository:
git clone https://github.com/transcriptionstream/phomymo.git cd phomymo -
Install dependencies:
npm install
node phomymo-cli.js --file ./image.png --label M260 --vendor 0x483 --product 0x5740| Option | Description | Default |
|---|---|---|
-f, --file <path> |
Image file to print | ./test.png |
-l, --label <type> |
Label type (M200, M260, 40x30, 60x40, custom) | M260 |
-w, --width <mm> |
Custom label width in mm | - |
-h, --height <mm> |
Custom label height in mm | - |
-v, --vendor <id> |
USB vendor ID | 0x483 |
-p, --product <id> |
USB product ID | 0x5740 |
-d, --density <1-8> |
Print density level | 6 |
-m, --margin <mm> |
Margin in millimeters | 2 |
-o, --offset <bytes> |
Horizontal offset in bytes | - |
-y, --voffset <dots> |
Vertical offset in dots | - |
-t, --test |
Print test alignment pattern | - |
-i, --initial-feed <dots> |
Feed before printing | - |
-n, --final-feed <dots> |
Feed after printing | - |
- Label Size Configuration - Sets pixel dimensions based on label size (203 DPI)
- Image Processing - Resizes image with margins and converts to 1-bit monochrome raster
- Printing - Sends ESC/POS commands and raster data to the printer
phomymo/
├── src/
│ └── web/ # Web Label Designer
│ ├── index.html # Main UI
│ ├── app.js # Application logic
│ ├── canvas.js # Canvas rendering
│ ├── elements.js # Element management
│ ├── handles.js # Selection handles
│ ├── storage.js # localStorage persistence
│ ├── templates.js # Variable substitution
│ ├── ble.js # Web Bluetooth transport
│ ├── usb.js # WebUSB transport
│ └── printer.js # Print protocol
├── phomymo-cli.js # CLI tool
├── package.json
└── README.md
- Web Designer: Any OS with Chrome/Chromium browser
- CLI Tool: Tested on macOS (USB support may vary on other platforms)
- Density control: Some printers (like M260) may not respond to runtime density commands. Print darkness may need to be adjusted via the printer's own settings.
- Web Bluetooth: Only available in Chromium-based browsers, requires HTTPS or localhost.
Thanks to these projects for inspiration:
This project is licensed under the MIT License – see the LICENSE file for details.
