Printer enumeration & capabilities #12

Closed
opened 2026-09-08 17:40:44 +01:00 by gronod · 0 comments
Owner

Summary

CUPS CLI enumeration for macOS. Cite docs 10 + 11. Doc 13 is Linux raw — enumeration patterns only.

Spec refs

docs/10-print-system.md, 11-print-macos.md. CPU #1 #2.

Scope

In: lpstat/lpoptions/PPD parsers and models.
Out: print_target, -o raw, Linux/Windows backends.

Implementation notes

  • lpstat -e destinations
  • lpstat -p status Idle/Printing/Stopped/Unknown
  • lpstat -d default
  • lpoptions -p <queue>printer-info display name
  • lpoptions -p <queue> -l: InputSlot/MediaSource → trays (1-based ids, * stripped); PageSize/MediaSize → paper; CNIJMediaType/MediaType/StpMediaType/EPIJ_Medi → media types
  • Also scan vendor tray keys EPIJ_FdSo, CNIJMediaSupply
  • PPD enrichment *Key id/Human: — UI shows Human, lp sends id
  • Models: Printer{name,status,isDefault,displayName}, PrinterTray, PrinterPaperSize, PrinterMediaType, PrinterCapabilities
  • Empty list is success
  • Spawn via Foundation Process or ProcessManager; not a shell pipeline

Rewrite invariants

CPU #1 titles vs codes. CPU #2 empty ≠ Auto. #48 no Windows CUPS checkbox (N/A on mac-only, still do not add a “PPD fallback” checkbox).

Dependencies

Blocks-on: 1 (optional 2).
Unblocks: 13, 17.

Test

  • CI/mock: recorded lpstat/lpoptions/PPD fixtures including Epson + Canon; empty list.
  • Hardware: optional live queue list.

Acceptance criteria

  • Parsers unit-tested on recorded outputs.
  • N printers handled; no crash on missing PPD.
## Summary CUPS CLI enumeration for macOS. Cite docs 10 + 11. Doc 13 is Linux raw — enumeration patterns only. ## Spec refs docs/10-print-system.md, 11-print-macos.md. CPU #1 #2. ## Scope In: lpstat/lpoptions/PPD parsers and models. Out: `print_target`, `-o raw`, Linux/Windows backends. ## Implementation notes - `lpstat -e` destinations - `lpstat -p` status Idle/Printing/Stopped/Unknown - `lpstat -d` default - `lpoptions -p <queue>` → `printer-info` display name - `lpoptions -p <queue> -l`: InputSlot/MediaSource → trays (1-based ids, `*` stripped); PageSize/MediaSize → paper; CNIJMediaType/MediaType/StpMediaType/EPIJ_Medi → media types - Also scan vendor tray keys `EPIJ_FdSo`, `CNIJMediaSupply` - PPD enrichment `*Key id/Human:` — UI shows Human, lp sends id - Models: `Printer{name,status,isDefault,displayName}`, `PrinterTray`, `PrinterPaperSize`, `PrinterMediaType`, `PrinterCapabilities` - Empty list is success - Spawn via Foundation Process or ProcessManager; not a shell pipeline ## Rewrite invariants CPU #1 titles vs codes. CPU #2 empty ≠ Auto. #48 no Windows CUPS checkbox (N/A on mac-only, still do not add a “PPD fallback” checkbox). ## Dependencies Blocks-on: 1 (optional 2). Unblocks: 13, 17. ## Test - CI/mock: recorded lpstat/lpoptions/PPD fixtures including Epson + Canon; empty list. - Hardware: optional live queue list. ## Acceptance criteria - [ ] Parsers unit-tested on recorded outputs. - [ ] N printers handled; no crash on missing PPD.
gronod added this to the M3 — macOS unmanaged printing (lp) milestone 2026-09-08 17:40:44 +01:00
gronod added the
Priority
Critical
1
Project/ICCery-v2Feature/Backend
labels 2026-09-08 17:40:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#12