diff --git a/README.md b/README.md index 0f3c68f..c1d8453 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,20 @@ curl -fsSL https://fieldlens.arrowstack.dev/downloads/install.sh | sh ``` The script supports x86_64/amd64 Debian/Ubuntu-style systems, downloads the public `.deb`, verifies its SHA-256, then installs it with the system package manager. + +## Printer queue setup + +FieldLens Print can create an OS printer queue that appears in normal application print dialogs. + +1. Open FieldLens Print. +2. Choose the installed physical printer under **Forward to installed printer**. +3. For network printers, FieldLens detects the RAW/TCP endpoint when the OS exposes it. Otherwise enter the printer address manually as `host:9100`. +4. Click **Create / repair FieldLens Print** and approve the Windows UAC / Linux CUPS elevation prompt. +5. Start RAW capture. +6. In the source application, print to **FieldLens Print**. + +Windows creates the virtual queue with the selected destination printer's existing driver and points it at `127.0.0.1:9100`, so the captured stream is already in the destination printer's language before FieldLens inspects and forwards it. + +Linux creates a CUPS raw queue named `FieldLens-Print` with display name **FieldLens Print** and routes it to the same local RAW listener. + +USB/shared queues may not expose a RAW/TCP address. In that case the installed-printer selector still supplies the driver for the virtual Windows queue, while the physical destination address must be entered manually. diff --git a/package.json b/package.json index e8e28cb..ecef650 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fieldlens/print", - "version": "0.1.1", + "version": "0.1.2", "private": true, "type": "module", "scripts": { diff --git a/src-tauri/src/printers.rs b/src-tauri/src/printers.rs index 26e4dde..5a6f21b 100644 --- a/src-tauri/src/printers.rs +++ b/src-tauri/src/printers.rs @@ -28,6 +28,11 @@ pub struct VirtualPrinterStatus { pub detail: String, } +fn is_virtual_printer_name(name: &str) -> bool { + name.eq_ignore_ascii_case(VIRTUAL_PRINTER_NAME) + || name.eq_ignore_ascii_case("FieldLens-Print") +} + pub fn list_system_printers() -> Result> { #[cfg(target_os = "windows")] { @@ -46,7 +51,7 @@ pub fn list_system_printers() -> Result> { pub fn virtual_printer_status() -> Result { let installed = list_system_printers()? .iter() - .any(|printer| printer.name.eq_ignore_ascii_case(VIRTUAL_PRINTER_NAME)); + .any(|printer| is_virtual_printer_name(&printer.name)); Ok(VirtualPrinterStatus { installed, @@ -263,7 +268,7 @@ fn list_linux_printers() -> Result> { driver: String::new(), port: uri.to_string(), address, - is_virtual: name.eq_ignore_ascii_case(VIRTUAL_PRINTER_NAME), + is_virtual: is_virtual_printer_name(name), }); } printers.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); @@ -293,6 +298,8 @@ fn install_linux_virtual_printer() -> Result<()> { "socket://127.0.0.1:9100", "-m", "raw", + "-D", + VIRTUAL_PRINTER_NAME, ]; let direct = Command::new("lpadmin").args(args).status(); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 09feb99..51f17ff 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "FieldLens Print", - "version": "0.1.1", + "version": "0.1.2", "identifier": "dev.arrowstack.fieldlens.print", "build": { "beforeDevCommand": "npm run dev",