Implement the Stage 2 Printable Target Generation step. After .ti1 generation, the user configures instrument and page size, then the Rust backend spawns printtarg to produce printable TIFF images and a .ti2 layout file.
Toolchain Context
Backend: Rust (Tauri 2) — spawns printtarg via ProcessManager
Frontend: Vanilla JS webview with Tauri IPC
Binary resolution: commands::resolve_binary() resolves platform-specific sidecar from argyll/<platform>/printtarg
Implementation Plan
Backend (Rust)
New Tauri commandcommands::run_printtarg(app, state, config):
Spawn via ProcessManager with appropriate working directory
Output discovery: After exit, scan working directory for generated .tif files matching the basename pattern. Return file list as JSON via a new list_target_files(dir, basename) command.
TIFF preview: Add a read_file_base64(path) utility command so the frontend can load generated TIFF images for in-app preview without filesystem access.
Frontend (JavaScript)
Stage 2 panel (#stage-2):
Instrument dropdown: i1Pro/i1Pro2 → -i i1, ColorMunki → -i CM, SpyderPrint → -i SS
Page size dropdown: A4, US Letter, Custom (WxH mm)
Bit depth toggle: 8-bit (-t) / 16-bit (-T)
"Create Layout" button invokes run_printtarg
TIFF preview gallery: After generation, display rendered target pages in a scrollable preview panel using base64-encoded images from read_file_base64. Show page count, dimensions.
⚠️ Print these target images with ALL printer driver colour management DISABLED.
(e.g., "No Colour Adjustment" on Epson, "Off (No Colour Adjustment)" on Canon)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Implement the Stage 2 Printable Target Generation step. After
.ti1generation, the user configures instrument and page size, then the Rust backend spawnsprinttargto produce printable TIFF images and a.ti2layout file.Toolchain Context
printtargviaProcessManagercommands::resolve_binary()resolves platform-specific sidecar fromargyll/<platform>/printtargImplementation Plan
Backend (Rust)
commands::run_printtarg(app, state, config):PrinttargConfigstruct:{ instrument: String, page_size: String, bit_depth: u8, dpi: u32, basename: String }["-v", "-i", <instr>, "-t"|"-T", <dpi>, "-p", <size>, <basename>]ProcessManagerwith appropriate working directory.tiffiles matching the basename pattern. Return file list as JSON via a newlist_target_files(dir, basename)command.read_file_base64(path)utility command so the frontend can load generated TIFF images for in-app preview without filesystem access.Frontend (JavaScript)
#stage-2):i1Pro/i1Pro2 → -i i1,ColorMunki → -i CM,SpyderPrint → -i SS-t) / 16-bit (-T)run_printtargread_file_base64. Show page count, dimensions.New/Modified Files
[MODIFY]src-tauri/src/commands.rs— addrun_printtarg,list_target_files,read_file_base64[MODIFY]src/index.html— expand Stage 2 panel with form controls and preview area[NEW]src/js/printtarg.js— Stage 2 frontend logic[MODIFY]src/styles/main.css— gallery and warning banner stylesAcceptance Criteria
.ti2+.tiffilesReferences
printtarg: gronod/argyllcms