Arabic Kitchen Printing for AAHB Brand
Designed and implemented a browser-to-LAN thermal printing pipeline for Odoo POS, with Arabic shaping, dynamic order types, three-column kitchen receipts, and direct ESC/POS raster output for Rongta RP325 printers.
The engineering problem
Odoo POS data was available in the browser, but the thermal printer could not reliably render Arabic text through the printer's native code pages. The solution therefore moved Arabic rendering into Python instead of depending on the printer firmware's Arabic support.
The browser sends structured UTF-8 receipt data to a local print bridge. Python shapes Arabic using arabic_reshaper and BiDi processing, renders the complete receipt as a monochrome bitmap, converts it to ESC/POS raster commands, and sends the bytes directly to the printer over TCP.
Key decision
Render the entire receipt as an image rather than mixing printer text modes. This avoids code-page inconsistencies and keeps Arabic, English, numbers and layout under one rendering pipeline.
Browser → Bridge → Printer
Dynamic order type
The implementation avoids translated preset names for routing. It uses the preset's semantic identification and maps the result to stable internal values such as dinein and takeaway, while the printed Arabic label remains user-facing.
Receipt layout
The final kitchen ticket was designed around a compact thermal workflow: large kitchen title, order number, order type, tracking number and date, followed by exactly three operational columns.
Illustration only — no customer or production data is exposed here.
| الصنف | الوحدة | الكمية |
|---|---|---|
| برجر لحم | قطعة | 2 |
| بطاطس | طبق | 1 |
| مشروب غازي | كوب | 2 |
ملاحظة: بدون بصل
Why raster?
- Consistent Arabic glyph shaping
- No dependency on RP325 Arabic code pages
- Exact pixel-level control over spacing and alignment
- Same output path for Arabic and Latin content
- Direct ESC/POS transport without a print server
What I implemented
- Odoo POS JavaScript service for order-type printing.
- UTF-8/Base64 browser transport to the local bridge.
- Python HTTP bridge with CORS and Private Network Access support.
- Arabic reshaping and BiDi rendering.
- 576-pixel monochrome receipt rendering for 80mm thermal output.
- ESC/POS GS v 0 raster conversion and raw TCP printing.
- Debug PNG generation to validate the receipt before physical printing.
- Dynamic kitchen routing for different order types.
Result
The result is a production-oriented POS printing path where Odoo remains responsible for business data, JavaScript prepares the receipt, Python owns typography/layout, and the RP325 receives printer-ready raster bytes.
View more work