RFC-003: Hardware Support Implementation
Overview
Technical implementation for multi-printer support with automatic canvas sizing.
Feature Requirements
Feature: Support for changing printers. Supported printers include: Canon Selphy CP1500, general POS thermal printers (Epson, Panda), and Instax Mini Link.
Details:
- Ability to seamlessly switch the target printer.
- Adjust the print output size natively according to the selected printer's specifications.
Supported Printers
| Printer | Connection | Paper Size | DPI |
|---|---|---|---|
| Canon Selphy CP1500 | USB/Bluetooth | 4x6, 5x7 | 300 |
| Epson TM-T88 | USB/Bluetooth | 58mm, 80mm | 203 |
| Niimbot B21 | Bluetooth | 58mm, 80mm | 203 |
| Instax Mini Link | Bluetooth | 62x46mm | 318 |
Printer Interface
interface Printer {
id: string;
name: string;
type: PrinterType;
paperSize: PaperSize;
dpi: number;
connect(): Promise<void>;
disconnect(): Promise<void>;
print(imageData: Blob): Promise<PrintResult>;
}
Canvas Configuration
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/printers | List supported printers |
| POST | /api/printers/connect | Connect to printer |
| POST | /api/printers/test | Print test page |
| GET | /api/printers/status | Get printer status |
Implementation Phases
- Phase 1: Printer abstraction + config loading
- Phase 2: Dynamic canvas sizing
- Phase 3: Test print functionality
- Phase 4: Instax Mini Link specific implementation