Printing
How printing works in HWD POS (CUPS, Chrome/Chromium and the hwpos-print service) and how to set it up.
Printing is installed by default (WITH_PRINTING=yes). Use WITH_PRINTING=no to skip it on a server that does not print, such as a database-only server.
Components
| Component | What it is for | If it is missing |
|---|---|---|
| CUPS | Printing on A4 printers (inkjet/laser) and on network printers via IPP/AirPrint. | Thermal printers (ESC/POS, 80 mm and 58 mm) keep working: they do not go through CUPS. |
| Google Chrome (or Chromium) | Turning the full A4 document (invoice and quotation with their layout) into PDF, headless. | Receipt-style printing keeps working; the designed A4 document cannot be generated. |
hwpos-print service | Prints, one by one, the documents the system puts in the queue. | Nothing prints. |
hwpos-plugins service | Runs plugin background work (for example, sending the email to the customer on the server, so the salesperson does not wait). | Plugin background tasks do not run. |
Both services must be active and enabled (auto-start). The installer's final summary checks them.
Checking the print service
sudo systemctl status hwpos-print
sudo systemctl status hwpos-pluginsWatch print activity in real time:
sudo journalctl -u hwpos-print -fYou can also start, stop and restart the print worker from hwdpanel (options 4–6), view the logs (option 18), or reinstall the background services (option 16).
Service user permissions
The web server user (www-data on Ubuntu/Debian) must belong to these groups:
lp, to access USB printers;lpadmin, to manage IPP queues.
The installer sets this up automatically.
Adding printers
In HWD POS, go to System → Printers (Sistema → Impresoras):
- Add each printer.
- Choose its paper: 80 mm or 58 mm thermal, or A4 document.
- Run the test print from the same screen.
If the A4 document prints with strange characters, the A4 printer is set up as a thermal printer. Change its paper to A4 document.
A4 PDF documents fail
On Ubuntu/Debian (amd64), the installer installs Google Chrome from its official .deb package. Ubuntu's chromium-browser is only a stub that redirects to Snap, and without snapd it does not work even though the command exists. The installer summary and check.sh verify it by running it (--version) as the web server user, not just by checking that the command exists.
If PDF generation or printing of A4 documents fails:
Check the browser:
sudo -u www-data google-chrome-stable --versionIf it does not respond, install it:
curl -fsSLO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get install -y ./google-chrome-stable_current_amd64.debYou can also use the Chrome/Chromium option in check.sh.
If you use a different browser, open Settings (Ajustes) in HWD POS and set its path in chrome_path.
Virtualized servers (Proxmox)
- VM (KVM) vs. LXC container: an LXC container is lighter, but passing a USB printer to it requires a privileged container and a bind mount of
/dev/usb/lp0. In a VM, use Proxmox USB passthrough (Hardware → Add → USB Device). - Simplest option: network (IP) printers. They avoid USB passthrough entirely. The worker prints over socket 9100 (thermal) or through an IPP/AirPrint queue (A4). Recommended for virtualized environments.
- Typical resources for a store: 2 vCPU, 2–4 GB RAM, 20 GB disk.
- Give the VM or container a fixed IP on the LAN so terminals and tablets can connect to it.