# 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. ```sh 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 ` 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).