Files
photoreport/apps/print-agent/README.md
T
spark ff8488fd93
ci / rust (push) Successful in 16m17s
ci / typescript (push) Failing after 16m55s
Kiosk with photobooth on a tablet, Windows print agent, face boxes that follow the crop
Impressão → Quiosque: a secret link for a tablet (photographer's photos, front camera photobooth, name and copies; paid prints at the counter). Print agent: Windows spooler through PowerShell. Loupe: face boxes in the edited preview's frame.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 11:29:23 +01:00

1.7 KiB

apps/print-agent

Runs on the computer next to the printers (macOS or Linux with CUPS, or Windows with the printer's driver). It pairs with PhotoReport once, tells the server which printers it sees, takes print jobs for printers loaded with the job's paper, prints them and reports back. Jobs from a station that dies mid-print go back to the queue after five minutes.

pnpm --filter @photoreport/print-agent build
node apps/print-agent/dist/cli.js pair ABCD2345 --api https://api.photoreport.pt   # code from Impressão > Estações
node apps/print-agent/dist/cli.js printers                                          # what CUPS sees
node apps/print-agent/dist/cli.js run
  • Paper: in the app, tick the sizes loaded in each printer (15x20 by default). CUPS media names for dye-sub printers (Gutenprint, Mitsubishi CP-D90DW): 10x15 w288h432, 15x20 w432h576, 20x30 w576h864; override with "media": {"15x20": "..."} in the config file (~/.config/photoreport-print-agent/config.json).
  • --folder <dir> at pairing prints into folders instead (training, tests without paper).
  • Windows: the spooler, through Windows PowerShell 5.1 and .NET (nothing else to install besides Node 22). It picks the driver's paper that matches the job's size (4x6, 5x7, 6x8 or 8x12 in), prints without margins and turns the photo to the paper. If a driver names a size differently, set "paper": {"15x20": [600, 800]} (hundredths of an inch) in the config, %APPDATA%\PhotoReport\photoreport-print-agent\config.json. To start it with Windows: schtasks /Create /SC ONLOGON /TN "PhotoReport impressao" /TR "node C:\photoreport\apps\print-agent\dist\cli.js run". Still to confirm on a real Windows computer with a dye-sub printer (DNP, Mitsubishi).