Console Integration
Plato Console uses theWIN_DRIVER printer adapter for the PC printer driver.
Printer Record
Console stores printers in an IndexedDB database namedprinter-database.
Printer records include:
- printer type
- status
- last error
- config
- paper width
- categories
- order types
- logo
Driver URL
TheWIN_DRIVER adapter builds its base URL from printer config:
driverPort is empty, the adapter omits the port. This is useful for HTTPS on port 443.
Printer Target
The adapter sends the physical printer target separately from the driver URL.| Config Field | Request Field | Notes |
|---|---|---|
driverIpAddress | URL host | Machine running plato-printer.exe. |
driverPort | URL port | Driver HTTP/HTTPS port. |
driverUseHttps | URL protocol | Uses https when true. |
ipAddress | ip_address | Physical printer IP. |
port | port | Physical printer TCP port. |
vendor | vendor_id | Mapped vendor ID. |
productId | product_id | Sent for compatibility. |
beep | beep | Enables post-print beep sequence. |
192.168.0.0, the adapter sends ip_address: null and port: null, which the current driver rejects with Missing printer address.
Vendor IDs
The adapter maps vendors:| Vendor | Vendor ID |
|---|---|
EPSON | 0x04b8 |
BIRCH | 0x1fc9 |
PHILIPS | 0x0471 |
SUNMI | 0x04b8 |
OSCAR | 0x04b8 |
Print Preparation
Console print flow:- Render DOM to PNG blob.
- Load blob into canvas.
- Convert canvas pixels to black/white raster rows.
- Split raster rows into 128-row chunks.
- Encode each chunk as ESC/POS raster bytes.
- Base64 encode each byte chunk.
- Send
POST /print.
Browser Queue
Console has a local browser queue before requests reach the PC driver.- Jobs are stored in IndexedDB.
- Jobs move from
pendingtoprinting. - Failed jobs are marked
failed. - A stale
printingjob is recovered after 60 seconds. - Scheduled jobs are checked every 30 seconds.
- Failed jobs are retried every 60 seconds.
| Queue | Location | Purpose |
|---|---|---|
| Browser queue | Plato Console IndexedDB | Keeps POS-side print jobs until a driver accepts them. |
| Driver queue | Redis/BullMQ | Keeps accepted jobs until the physical printer receives them. |
Status Mapping
Console callsPOST /status.
- HTTP failure returns
OFFLINE. - Response with
ok: trueandstatusnotofflinereturnsONLINE. - Other driver responses are stored as
lastError.
Cash Drawer
Console callsPOST /cash-drawer for every online printer configured with a cash drawer.