feat(print): Windows Native Raw Print Spooler (GDI/ICM Bypass) (#26) #29

Merged
gronod merged 4 commits from feature/issue-26-windows-raw-print into development 2026-08-23 14:47:02 +01:00
Owner

Summary

Resolves #26 (Sub-Task 1 of Milestone 6: Native Raw OS Printing Engine #25).

Implements the Windows native raw printing spooler backend within the Tauri Rust core to bypass Windows GDI Image Color Management (ICM) and print unmanaged profiling targets directly to inkjet and raster printers.

Changes

  • Modular Printing Backend (src-tauri/src/print/):
    • mod.rs: Platform abstraction with non-Windows stubs.
    • windows.rs:
      • get_printers: Native printer enumeration using EnumPrintersW (Level 4 with Level 2 fallback).
      • print_target:
        • TIFF loading and conversion into an uncompressed 24-bit BGR DIB buffer with 4-byte row stride alignment.
        • Printer handle management via OpenPrinterW and DEVMODEW manipulation (dmICMMethod = DMICMMETHOD_NONE).
        • Device context creation (CreateDCW) and GDI color management bypass (SetICMMode(hdc, ICM_OFF)).
        • Bitmap drawing to device context via StretchDIBits and GDI document lifecycle APIs (StartDocW, StartPage, EndPage, EndDoc).
  • Tauri Commands & Registration (src-tauri/src/commands.rs & src-tauri/src/lib.rs):
    • Added and registered get_windows_printers and print_target_windows.
  • Dependencies (src-tauri/Cargo.toml):
    • Added image crate (v0.25) with TIFF decoding.
    • Added windows crate (v0.58) under target.'cfg(windows)'.dependencies.

Testing & Verification

  • cargo check: Clean compilation on Linux.
  • cargo test: All 8 unit tests passed.
## Summary Resolves #26 (Sub-Task 1 of Milestone 6: Native Raw OS Printing Engine #25). Implements the Windows native raw printing spooler backend within the Tauri Rust core to bypass Windows GDI Image Color Management (ICM) and print unmanaged profiling targets directly to inkjet and raster printers. ### Changes - **Modular Printing Backend (`src-tauri/src/print/`)**: - `mod.rs`: Platform abstraction with non-Windows stubs. - `windows.rs`: - `get_printers`: Native printer enumeration using `EnumPrintersW` (Level 4 with Level 2 fallback). - `print_target`: - TIFF loading and conversion into an uncompressed 24-bit BGR DIB buffer with 4-byte row stride alignment. - Printer handle management via `OpenPrinterW` and `DEVMODEW` manipulation (`dmICMMethod = DMICMMETHOD_NONE`). - Device context creation (`CreateDCW`) and GDI color management bypass (`SetICMMode(hdc, ICM_OFF)`). - Bitmap drawing to device context via `StretchDIBits` and GDI document lifecycle APIs (`StartDocW`, `StartPage`, `EndPage`, `EndDoc`). - **Tauri Commands & Registration (`src-tauri/src/commands.rs` & `src-tauri/src/lib.rs`)**: - Added and registered `get_windows_printers` and `print_target_windows`. - **Dependencies (`src-tauri/Cargo.toml`)**: - Added `image` crate (v0.25) with TIFF decoding. - Added `windows` crate (v0.58) under `target.'cfg(windows)'.dependencies`. ### Testing & Verification - `cargo check`: Clean compilation on Linux. - `cargo test`: All 8 unit tests passed.
gronod added 1 commit 2026-08-23 11:34:09 +01:00
feat(print): implement Windows native raw print spooler and printer enumeration (#26)
Build Linux Packages / Build Linux (pull_request) Failing after 10m21s
Build Windows Packages / Build Windows (pull_request) Has been cancelled
Build macOS Packages / Build macOS (Apple Silicon) (pull_request) Has been cancelled
Build macOS Packages / Build macOS (Intel) (pull_request) Has been cancelled
5c238e9db9
gronod added 1 commit 2026-08-23 13:27:47 +01:00
ci: add libfuse2 and squashfs-tools for AppImage bundling in Linux CI
Build Linux Packages / Build Linux (pull_request) Failing after 17m21s
Build Windows Packages / Build Windows (pull_request) Has been cancelled
Build macOS Packages / Build macOS (Apple Silicon) (pull_request) Has been cancelled
Build macOS Packages / Build macOS (Intel) (pull_request) Has been cancelled
231c938eec
gronod added 1 commit 2026-08-23 13:59:47 +01:00
ci: enable verbose output and zsync in Linux build workflow
Build Linux Packages / Build Linux (pull_request) Failing after 17m12s
f52b24784a
gronod added 1 commit 2026-08-23 14:17:34 +01:00
ci: add X11 libraries required by ArgyllCMS binaries for linuxdeploy bundling
Build Linux Packages / Build Linux (pull_request) Successful in 21m5s
d663311fc6
gronod merged commit 5573632e5c into development 2026-08-23 14:47:02 +01:00
Sign in to join this conversation.