# Printing

Printer configuration is modeled in `printers` / `printer_routes`
(`58mm`/`80mm`/`A4`, type `bill`/`kot`/`kitchen`/`receipt`/`label`) and
exposed via `/api/settings/printers` and `/api/settings/printer-routes`.

## Approach

This build uses **browser printing** (`window.print()`) against
print-specific CSS rather than a native ESC/POS driver integration — that
keeps the system portable across thermal printers without a native
dependency, matching spec §72's "Use browser print" / "Create @media print
CSS" guidance.

`frontend/src/styles/utilities.css` already includes a baseline
`@media print` block that hides the sidebar/topbar/buttons/modal-footers.

## Remaining work for a full print set

The components explicitly called out in spec §72 —
`Invoice`, `ThermalReceipt`, `KOTTicket`, `RoomFolioInvoice`,
`DayEndReport` — are **not yet built** as dedicated printable React
components in this delivery (tracked in the root `README.md`'s "Known
Remaining Work"). They should be added as:

```
frontend/src/components/print/
  Invoice.jsx          # A4, full tax breakdown (CGST/SGST/IGST), footer/terms
  ThermalReceipt.jsx    # 58mm / 80mm width variants
  KOTTicket.jsx          # station-scoped ticket for kitchen printers
  RoomFolioInvoice.jsx   # final hotel bill at checkout
  DayEndReport.jsx       # day-end summary printout
```

Each should render from the same order/folio/day-end API payloads already
returned by the backend (`GET /api/orders/:id`, `GET /api/folios/:id`,
`GET /api/cash-registers/day-end`), wrapped in a print-only route/modal that
calls `window.print()`, with a `paper_size`-aware width class
(`58mm`/`80mm`/`A4`) driven by the outlet's configured printer.
