Files
photoreport/apps/print-agent
sparkandClaude Opus 5.5 d40dd9552d
ci / typescript (push) Successful in 16m21s
ci / rust (push) Successful in 22m6s
feat(print): on-site printing with a QR page for guests and a print agent
Print events with a QR code to events.photoreport.pt/e/<slug>; 300 dpi prints with the event's band and border; approval and limits; live queue in the app; apps/print-agent pairs with a one-time code, reports CUPS printers, claims jobs for loaded paper and prints with lp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 22:36:26 +01:00
..

apps/print-agent

Runs on the computer next to the printers (macOS or Linux with CUPS). 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: not yet (needs a provider for the Windows spooler).