feat(print): macOS native CUPS raw print spooler integration (resolves #92) #130

Merged
gronod merged 1 commits from feat/92-macos-cups-raw-spooling into development 2026-08-29 11:48:42 +01:00
Owner

Description

Implements the macOS native CUPS raw printing backend to completely bypass Apple ColorSync color transformation layers when spooling profiling target TIFFs to physical printers.

Changes

  • New Module src-tauri/src/print/macos.rs:
    • Adds build_lp_args with Apple ColorSync suppression flags (-o raw, -o AP_ColorMatchingMode=AP_ApplicationColorMatching, -o cm-calibration, etc.).
    • Implements print_target and show_printer_properties for macOS.
    • Re-exports CUPS printer query utilities (get_printers, get_printer_capabilities, parse_lpstat_e, parse_lpstat_p, parse_lpstat_d, parse_lpoptions_l).
  • Module Registration (src-tauri/src/print/mod.rs):
    • Registers pub mod macos; conditionally on target_os = "macos" and in tests.
  • Tauri IPC Command Routing (src-tauri/src/commands.rs):
    • Routes get_printers, get_printer_capabilities, show_printer_properties, and print_target_native to crate::print::macos on target_os = "macos".
  • Unit Tests (src-tauri/src/print/tests.rs):
    • Adds tests for test_macos_build_lp_args_colorsync_suppression and test_macos_print_target_nonexistent_file.

Resolves #92.

### Description Implements the macOS native CUPS raw printing backend to completely bypass Apple ColorSync color transformation layers when spooling profiling target TIFFs to physical printers. ### Changes - **New Module `src-tauri/src/print/macos.rs`**: - Adds `build_lp_args` with Apple ColorSync suppression flags (`-o raw`, `-o AP_ColorMatchingMode=AP_ApplicationColorMatching`, `-o cm-calibration`, etc.). - Implements `print_target` and `show_printer_properties` for macOS. - Re-exports CUPS printer query utilities (`get_printers`, `get_printer_capabilities`, `parse_lpstat_e`, `parse_lpstat_p`, `parse_lpstat_d`, `parse_lpoptions_l`). - **Module Registration (`src-tauri/src/print/mod.rs`)**: - Registers `pub mod macos;` conditionally on `target_os = "macos"` and in tests. - **Tauri IPC Command Routing (`src-tauri/src/commands.rs`)**: - Routes `get_printers`, `get_printer_capabilities`, `show_printer_properties`, and `print_target_native` to `crate::print::macos` on `target_os = "macos"`. - **Unit Tests (`src-tauri/src/print/tests.rs`)**: - Adds tests for `test_macos_build_lp_args_colorsync_suppression` and `test_macos_print_target_nonexistent_file`. Resolves #92.
gronod added 1 commit 2026-08-29 11:47:18 +01:00
gronod merged commit eb7007a8a2 into development 2026-08-29 11:48:42 +01:00
gronod deleted branch feat/92-macos-cups-raw-spooling 2026-08-29 11:48:43 +01:00
Sign in to join this conversation.