PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M10.5: Integrate main and adopt the validated craft-print spooler
skylar taylor-barrick981a2e57c868
diff --cc Cargo.lockindex f22b7be59,47121b7e3..42f98e590--- a/Cargo.lock+++ b/Cargo.lock@@@ -1090,14 -1090,6 +1090,14 @@@ dependencies ="libc",]+[[package]]+name = "craft-print"+version = "0.1.0"- source = "git+https://github.com/storytold/craft-libs?rev=da752825c70574a2423ee55427f8f7aa5b5f8ec8#da752825c70574a2423ee55427f8f7aa5b5f8ec8"++source = "git+https://github.com/storytold/craft-libs?rev=32bcac12db98113d18d8f56bc47fb6ddabe4d54f#32bcac12db98113d18d8f56bc47fb6ddabe4d54f"+dependencies = [+ "tempfile",+]+[[package]]name = "craft-ui"version = "0.1.0"@@@ -1749,7 -1741,7 +1749,7 @@@ source = "registry+https://github.com/rchecksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"dependencies = ["libc",-- "windows-sys 0.61.2",++ "windows-sys 0.52.0",][[package]]@@@ -4889,7 -4898,7 +4907,7 @@@ dependencies ="errno","libc","linux-raw-sys 0.12.1",-- "windows-sys 0.61.2",++ "windows-sys 0.52.0",][[package]]@@@ -5512,10 -5521,10 +5530,10 @@@ source = "registry+https://github.com/rchecksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"dependencies = ["fastrand",-- "getrandom 0.4.3",++ "getrandom 0.3.4","once_cell","rustix 1.1.5",-- "windows-sys 0.61.2",++ "windows-sys 0.52.0",][[package]]@@@ -5783,7 -5792,7 +5801,7 @@@ checksum = "f2f6fb2847f6742cd76af783a2adependencies = ["memoffset","tempfile",-- "windows-sys 0.61.2",++ "windows-sys 0.60.2",][[package]]@@@ -6475,7 -6484,7 +6493,7 @@@ version = "0.1.11source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"dependencies = [-- "windows-sys 0.61.2",++ "windows-sys 0.52.0",][[package]]diff --cc Cargo.tomlindex ed72d2329,70a65b6b9..bad4eda2e--- a/Cargo.toml+++ b/Cargo.toml@@@ -14,8 -14,6 +14,8 @@@ repository = "https://github.com/storyt[workspace.dependencies]# Shared frontend components; engines remain independent of egui.craft-ui = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "5c874d51eeb3de70e735c8ce87a59a7dedd47675", features = ["serde"] }+# Shared system spooler; document composition remains in pdfcraft-print.- craft-print = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "da752825c70574a2423ee55427f8f7aa5b5f8ec8" }++craft-print = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "32bcac12db98113d18d8f56bc47fb6ddabe4d54f" }# internalpdfcraft-geom = { path = "crates/geom", version = "0.6.0" }pdfcraft-filters = { path = "crates/filters", version = "0.6.0" }diff --cc README.mdindex 1b6cd0a05,a0e985b1a..e2be10ef6--- a/README.md+++ b/README.md@@@ -416,10 -417,10 +417,10 @@@ PdfCraft is young and moving fast. The- **Good today:** viewing and search; organizing, combining and splitting; most kinds of comment; filling and authoring forms (with sandboxed JavaScript); passwords, redaction and sanitizing; basic digital signatures; printing; the Accessibility Checker; agent control through the CLI and MCP.- **Still borrowed:** pages are drawn by the `hayro` crate while our own renderer is built.- - **Thin or missing:** reliable editing of existing text (especially CJK and right-to-left), OCR beyond Latin script, Office import/export, signature tokens and online long-term validation, Preflight and PDF/X/UA, physical printer fidelity, and full XFA forms.-- **Thin or missing:** reliable editing of existing text (especially CJK and right-to-left), OCR beyond Latin script, Office import/export, signature tokens and online long-term validation, Preflight and PDF/X/UA, printing from the web build, and full XFA forms.++- **Thin or missing:** reliable editing of existing text (especially CJK and right-to-left), OCR beyond Latin script, Office import/export, signature tokens and online long-term validation, Preflight and PDF/X/UA, printing from the web build, physical printer fidelity, and full XFA forms.- **Hardening:** fuzzing still turns up crashes and hangs on hostile files; each one is fixed with a regression test. Quality has not yet been compared with Acrobat side by side.- **Next, in order:** encrypted files that Acrobat opens, the reported bugs and physical printer validation, a fidelity harness against Acrobat and the renderer, editing existing content, then the Pro workflows (OCR, Office, Preflight, signatures, accessibility tagging) and 1.0 polish.+ **Next, in order:** Office-to-PDF and a Word export that keeps layout, the reported bugs, web printing and the Chinese interface font, a fidelity harness against Acrobat and the renderer, editing existing content, then the Pro workflows (OCR, Office, Preflight, signatures, accessibility tagging) and 1.0 polish.The summary is in **[ROADMAP.md](ROADMAP.md)**; the full assessment by dimension and area is in [docs/target-app-parity.md](docs/target-app-parity.md), the ranked gaps in [docs/gaps.md](docs/gaps.md), and the milestones in [docs/roadmap.md](docs/roadmap.md).diff --cc ROADMAP.mdindex e38d307cd,45f7ec002..9ebf37f2f--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -2,7 -2,9 +2,9 @@@**Stage: alpha** · next: beta, ~26% (ready for real work 49% → 75%) and ~400–700 h away- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared print spooler; Windows CI enabled) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (architectural paper controls from #599; localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)++> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared craft-print spooler with passing Windows CI; architectural paper controls from #599; localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)+ > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** M14 #307 Plan 3 uses one marker traversal on open and full refresh, and the combined scanner borrows metadata instead of cloning scan-only containers; includes a behavior-preserving `organize` binding for the workspace Clippy gate · earlier: minor (localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)+ > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (closed issues synced: #774, #756 and the #799–#821 batch; earlier: localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)PdfCraft's one-page summary: how close it is to Adobe Acrobat Pro's offline feature set, and whatcomes next. Adobe's cloud services (Document Cloud, Acrobat Sign requests, shared review, the AI@@@ -133,9 -135,31 +135,32 @@@ Ranked; detail and the full milestone t## Progress log+ - **2026-10-11 (M10.5, focused follow-up to #599):** Carry the architectural/ANSI/large ISO paper presets, current-page matching at 100%, and previewed PDF scale into the current print dialog and `doc_print`. Retains the #847/#1007 spooler and background discovery. Driver substitution, physical calibration, vector Windows printing and managed-endpoint restrictions remain separate gaps. Overall estimates unchanged.+Newest first: the date, what moved, and the new overall estimate.- - **2026-10-11 (M10.5):** Extracted printer discovery, options and PDF submission into craft-libs/craft-print, shared with DesignCraft. Windows preserves composed sheet size and orientation without fitting into default margins; duplex binding edges are corrected. PdfCraft retains permission checks and imposition. Shared transport and local composition, engine, automation and UI coverage validate the boundary; native Windows regression execution is pending; physical printer fidelity remains a hardware check. Rust 1.95 is required by the shared crate. No readiness percentage change.++- **2026-10-11 (M10.5):** Extracted printer discovery, options and PDF submission into craft-libs/craft-print, shared with DesignCraft. Windows preserves composed sheet size and orientation without fitting into default margins; duplex binding edges are corrected. PdfCraft retains permission checks and imposition. Shared transport and local composition, engine, automation and UI coverage validate the boundary; native Windows CI passes, including paused-queue submission and cleanup; physical printer fidelity remains a hardware check. Rust 1.95 is required by the shared crate. No readiness percentage change.+ - **2026-10-11 (#995, #1077, permissions password after opening):** A PDF with only a permissions password opens without asking, restricted, and nothing let the user enter that password afterwards: the notice and the hint pointed at reopening with it. Now the security notice and Properties ▸ Security offer Unlock…, and Change settings / Remove security on a restricted document ask for the permissions password first and then carry on (as Acrobat does). The open password is refused there. `Session::unlock` upgrades the open document in place (owner and user passwords unlock the same file key, so nothing is re-read), unlocks the undo and redo states and reopens saves as owner; it is not an edit and doesn't mark the document unsaved. New command `protect.unlock`; the new strings are in all 15 full catalogs. Tests cover crypt, cos, engine (undo, redo, save, separate open password) and the UI. Still missing: an automation tool for it. Estimates unchanged.+ - **2026-10-11 (M14, #307 Plan 3):** Engine open and full refresh use one page/content traversal to populate marks and added content. The independent public scans remain available; the combined scanner borrows direct objects and holds referenced objects through `Arc<Object>` instead of cloning scan-only `/Contents` arrays or `/PCAdded` dictionaries. Differential tests cover an indirect `/PCAdded` dictionary as well as ordering, malformed/direct/indirect/repeated entries and `/UserUnit`. Exact `bbbe600`→final release CLI measurements used 10 alternating pairs: wall-time medians were 183.645→174.440 ms on 10,000 marker-free pages (10/10 wins), 33.587→32.752 ms on 1,500 mixed pages (8/10), and 24.331→20.133 ms on the 100,000-entry array stress fixture (10/10). The stress fixture's maximum-RSS median fell 28,655,616→19,038,208 B; peak-footprint medians were 14,747,136→14,673,408 B. From P0, the follow-up stress run was 20.886→20.201 ms (10/10), with RSS 23,953,408→19,087,360 B and peak footprint 14,706,144→14,697,952 B. `doc_open` stdout hashes matched every pair. The ancillary `organize` binding preserves the prior `prune_legacy` update condition. Estimates unchanged.+ - **2026-10-11 (M4, Organize overview):** Opening Organize pages from All tools, Home, the tool palette or `ui.set tool=organize` opens the thumbnail grid directly. Checkboxes toggle individual pages without modifier keys; page controls rotate either way or delete one page, while the toolbar acts on the selection. Portrait and landscape previews retain their aspect ratio. UI and control regressions cover entry, selection, single-page versus batch actions, undo, permissions and retaining the last page. Milestone and effort estimates unchanged.++ - **2026-10-10 (M9, signature graphics):** A visible digital signature can show a graphic where the signer's name is large, as Acrobat's Configure Signature Appearance does: the saved Fill & Sign signature (drawn strokes smoothed as ink, typed outlines in the script font, or an image) or an imported PNG/JPEG. Sign as previews it and remembers the choice for the next signing; `sign_document` takes `graphic` (`image`, `text` or `strokes`). Graphics are checked and capped before drawing (non-finite or unbounded points, mismatched pixel buffers, oversized images are refused with an error the caller can act on); images keep their alpha as a soft mask. `sign.signature-appearance` stays partial (no named saved appearances or PDF-page graphics). Overall estimates unchanged.+ - **2026-10-11 (M14, absolute interface sizes):** A chosen Interface size is now absolute, as PhotoCraft's UI Scale is: "100%" is one screen pixel per point whatever scale the display reports, so on a 1080p screen whose system reports 200 % it draws at a true 100 % (#456, reported after the first change). Auto still keeps the display's scale and adds GNOME's text scaling, and its menu entry shows the size it draws at. The menu offers PhotoCraft's sizes (75–300 %).+ - **2026-10-11 (automation, #971):** `text_find` reads pages in growing batches (8, doubling to 128) and stops once `limit` is reached, so a bounded search on a long document no longer extracts and caches every page first. Results say `complete`, and a capped one gives `next` (`start_page`, `skip`) to continue. Still open from #971: a byte budget for the automation text cache and per-page warnings for pages whose text can't be extracted.+ - **2026-10-11 (docs, closed issues):** The progress docs caught up with issues closed on 2026-10-10: encrypted output opens in Acrobat (#774, #836; gap 1 closed, rank 0 is 32–55 h), Windows prints (#756, #847), column select (#740), 1:1 touchpad scrolling (#759), same-page multi-object move (#844), and the #799–#821 batch of wrong-result fixes including the #816 panic. Scores and readiness not re-judged; overall estimate unchanged.+ - **2026-10-11 (M7, watermark placement):** A watermark can be moved from the page centre by a horizontal and a vertical offset in points: Add/Update Watermark has an "Offset from centre" row (the preview follows it, for text and for pictures) and `doc_watermark` takes `offset_x` and `offset_y`. A non-finite offset is refused instead of written into the page. `edit.watermark-appearance` stays partial: no offset from the page edge or in page units, no print/screen-only variants, no repeat. Image and PDF watermarks, already shipped, no longer appear as missing. The overall estimate is unchanged.+ - **2026-10-11 (M12, XFA script time limits):** An XFA script's time limit (1 s for scripts that run unasked, on open and on every change) counted the engine's start-up too: the script's thread, a new context and, for the first script in a process, the engine's own set-up (≈ 60–170 ms when idle). On a busy machine a trivial initialize script could pass the limit, be abandoned and turn the form's scripts off; that made `xfa_buttons_run_their_scripts_in_the_app` and `messages_from_scripts_run_on_open_show_right_away` flaky (under full CPU load 25 of 40 runs of the test binary failed, with "ran longer than 1.0 s and was abandoned" in the console). The limit now runs from when the engine is ready; start-up has its own 10 s cap, so nothing waits forever, and a trivial warm-up script takes the first-in-process set-up. Under the same load none of 40 runs fails, and runaway scripts are abandoned as before. The two UI tests print the script console when they fail. Overall unchanged.+ - **2026-10-11 (M4, #569):** Combine files takes images and text files as well as PDFs. PNG, JPEG, TIFF, GIF, BMP, JPEG 2000 and .txt files become PDFs as they are added (Add files…, drops, folder scans), so each is an ordinary row with its pages, thumbnails and page range; a file that can't be read (a damaged image or PDF, a type that can't be converted) stays in the list with why in its Warnings, and Combine asks before leaving such files out (Cancel changes nothing); password-protected files still have to be unlocked first. `doc_combine` accepts the same types, and a converted file's bookmark drops its extension. A PNG whose header claims more than 2 GiB of pixels is now refused before its buffer is allocated (the png crate's limits don't cover it), as TIFF already was. Office documents and HTML are still not converted. Overall estimate unchanged.+ - **2026-10-11 (M3, Windows renderer startup):** Renderer-creation GPU errors return through the existing scoped handler so Auto startup can use the existing OpenGL fallback. A real-device invalid/valid pipeline regression covers error propagation and device reuse; the independent Windows hostile-argument fixture reports unavailable symbolic-link privileges. The underlying x86 DX12 compiler error remains unresolved; see `docs/windows-renderer-startup.md`. Milestone and effort estimates unchanged.++ - **2026-10-11 (M6):** Existing simple field-font encodings and Differences are respected when generating appearances; an unencodable value uses a separate Helvetica appearance font without changing the source font. Synthetic reopen regressions cover punctuation, subset fallback and multiline text. Exact font metrics/layout and broader Unicode fallback remain incomplete. Estimates unchanged.++ - **2026-10-11 (M6):** Tab and Shift-Tab wrapping to the same field or another widget of that field refresh the newly opened editor from the accepted value before Save. Synthetic UI regressions cover both directions, same-frame Save, validation refusal and undo/redo. Estimates unchanged.++ - **2026-10-11 (M13):** CLI run and MCP reject missing, empty, repeated and option-valued --root arguments before any tool/script execution or MCP initialization. A single-hyphen directory name remains valid; synthetic CLI regressions preserve a would-be overwritten file. Estimates unchanged.++ - **2026-10-11 (M14, #307, Plan 2):** Forms now return terminal fields and the page-widget adoption count from one enumeration, and engine open reuses that result while retaining XFA script-button marking. The 12,000-page/no-form PDF (1,442,052 bytes) and 2,500-orphan-widget PDF (673,432 bytes) produce byte-identical `doc_open`/`doc_info` outputs against upstream `33c14e07cfd742a82bf03baa6b103c01008fa68c`, including the orphan repair note. After one warm-up per binary and three interleaved base/candidate rounds, median open times were 0.16/0.15 s and 0.08/0.07 s, with median peak RSS 62.69/59.98 MiB and 33.28/32.20 MiB. Workspace tests, Clippy, formatting, focused forms/engine/organize tests, and the WASM check pass. A behavior-preserving local binding in `organize` also lets the workspace Clippy gate pass. No estimate change.+ - **2026-10-11 (M14, Traditional Chinese semantics):** Corrected accessibility pass/fail labels, the inverted script-accessibility rule, Taiwan row/column terminology and form choice/read-only labels; added the missing table-row explanation. Catalog regressions cover the rule metadata and preserve field names. Milestone and effort estimates unchanged.- **2026-10-10 (M14, interface size):** Preferences ▸ Interface size scales the whole interface (50–250 %, setting `ui_scale`, control option `ui-scale`); 50 % brings an interface the system draws at 200 % back to 100 % (#456). Auto, the default, follows the desktop's text scaling: on Linux and the BSDs the desktop app reads GNOME's `text-scaling-factor` once at launch, so with Large Text (1.25) on a 1× display the interface no longer draws 13 px labels that show their pixels next to the system's text. The size is egui's zoom factor, so `pixels_per_point` grows with it and page rasters stay one texel per screen pixel; egui's own ⌘+/⌘− interface zoom is turned off so those keys stay page zoom. Still missing: KDE's font DPI and Windows' "Make text bigger" aren't read (both scale only text there), and egui's text is still greyscale-antialiased without the system's gamma, so small text looks rougher than GTK's at 100 %.- **2026-10-10 (M14, #496):** Shortcut displays share a UI formatter across toolbar search, registry menus, command palette, Help and tooltips. Modifier and key names use a dedicated catalog context in every bundled translation; missing entries keep the English key name rather than a command translation. German shows Strg/Umschalt/Entf, macOS retains its symbols, and runtime language changes refresh the display. Regression coverage checks localized layout widths, English/German switching, platform conventions and unchanged command execution. Milestone and effort estimates unchanged.diff --cc crates/automation/tests/automation.rsindex 26bc2b26f,be1c71346..b07af9a29--- a/crates/automation/tests/automation.rs+++ b/crates/automation/tests/automation.rs@@@ -2198,6 -2370,50 +2370,50 @@@ fn removing_hidden_information_through_assert!(matches!(a.call("doc_remove_hidden", &json!({ "doc": doc, "categories": ["nonsense"] })), Err(ToolError::InvalidArgs(_))));}+ /// A one-page PDF whose text "TOP SECRET" sits under an opaque black rectangle.+ fn faux_redacted_fixture() -> Vec<u8> {+ let body = "BT /F1 24 Tf 100 700 Td (TOP SECRET) Tj ET\n0 g\n90 688 220 32 re f";+ let objs: Vec<Vec<u8>> = vec![+ b"<< /Type /Catalog /Pages 2 0 R >>".to_vec(),+ b"<< /Type /Pages /Kids [4 0 R] /Count 1 >>".to_vec(),+ b"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>".to_vec(),+ "<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 5 0 R /Resources << /Font << /F1 3 0 R >> >> >>".to_string().into_bytes(),+ format!("<< /Length {} >>\nstream\n{body}\nendstream", body.len()).into_bytes(),+ ];+ let mut out = b"%PDF-1.7\n".to_vec();+ let mut offsets = Vec::new();+ for (i, o) in objs.iter().enumerate() {+ offsets.push(out.len());+ out.extend_from_slice(format!("{} 0 obj\n", i + 1).as_bytes());+ out.extend_from_slice(o);+ out.extend_from_slice(b"\nendobj\n");+ }+ let xref = out.len();+ out.extend_from_slice(format!("xref\n0 {}\n0000000000 65535 f \n", objs.len() + 1).as_bytes());+ for o in offsets {+ out.extend_from_slice(format!("{o:010} 00000 n \n").as_bytes());+ }+ out.extend_from_slice(format!("trailer\n<< /Size {} /Root 1 0 R >>\nstartxref\n{xref}\n%%EOF\n", objs.len() + 1).as_bytes());+ out+ }++ #[test]+ fn auditing_faux_redactions_through_tools() {- let dir = workdir("audit");++ let dir = workdir("audit-redactions");+ std::fs::write(dir.join("redacted.pdf"), faux_redacted_fixture()).unwrap();+ let mut a = auto(&dir);+ let doc = ok(&mut a, "doc_open", json!({ "path": "redacted.pdf" }))["doc"].as_u64().unwrap();+ let r = ok(&mut a, "doc_audit_redactions", json!({ "doc": doc }));+ assert_eq!(r["count"], 1, "{r}");+ let f = &r["findings"][0];+ assert_eq!(f["page"], 1);+ assert_eq!(f["kind"], "covered-text");+ assert!(f["covered_text"].as_str().unwrap().contains("TOP SECRET"), "{f}");+ // A clean document audits clean.+ let clean = ok(&mut a, "doc_open", json!({ "path": "a.pdf" }))["doc"].as_u64().unwrap();+ assert_eq!(ok(&mut a, "doc_audit_redactions", json!({ "doc": clean }))["count"], 0);+ }+#[test]fn printing_through_tools() {let dir = workdir("print");diff --cc crates/ui-egui/src/canvas.rsindex bf66f873b,c26b108da..eeb8e7b06--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@@ -2388,29 -2672,30 +2672,30 @@@ pub fn document_area(app: &mut PdfCraftview.selection = None;}// Quick clicks widen the selection: two a word, three the line, four the page.- // egui counts up to three, so four come from the run kept here. The markup and- // Redact tools mark a double-clicked word at once, so they stop at the word.- let clicks = if resp.triple_clicked() {+ // Release-based fallback for platforms or synthetic events that report double_clicked.+ let release_clicks = if resp.triple_clicked() {view.clicks.max(2).saturating_add(1)} else if resp.double_clicked() {- 2+ view.clicks.max(2)} else {- u32::from(resp.clicked())+ 0};- if clicks > 0 {- view.clicks = clicks;+ if release_clicks > 0 {+ view.clicks = release_clicks;}- let clicks = if clicks > 2 && tool != QuickTool::Select { 1 } else { clicks };- if clicks >= 2 && over_text {- let span = text.nearest(vx, vy).and_then(|a| match clicks {- 2 => text.word_at(a),- 3 => text.line_at(a),- _ => text.glyphs.len().checked_sub(1).map(|last| (0, last)),- });- if let Some((first, last)) = span {- view.selection = Some(Selection::run(i, first, last));+ let clicks = if view.clicks > 2 && tool != QuickTool::Select { 1 } else { view.clicks };- if clicks >= 2 && over_text {++ if release_clicks > 0 && clicks >= 2 && over_text {+ if view.selection.is_none() {+ let span = text.nearest(vx, vy).and_then(|a| match clicks {+ 2 => text.word_at(a),+ 3 => text.line_at(a),+ _ => text.glyphs.len().checked_sub(1).map(|last| (0, last)),+ });+ if let Some((first, last)) = span {+ view.selection = Some(Selection::run(i, first, last));+ }}- } else if resp.clicked() && !over_link {+ } else if resp.clicked() && view.clicks < 2 && !over_link {// ⇧-click extends a selection on this page to the click, keeping its// anchor (#527). Otherwise (no shift, no selection on this page, or a// column selection, which has no anchor glyph; a selection cannot yetdiff --cc crates/ui-egui/tests/javascript.rsindex a5c5a6aff,a5c5a6aff..786a4301c--- a/crates/ui-egui/tests/javascript.rs+++ b/crates/ui-egui/tests/javascript.rs@@@ -92,8 -92,8 +92,11 @@@ fn document_scripts_and_preferences()h.run_steps(2);let id = h.state().active_ids().unwrap().1;assert_eq!(h.state().session.get(id).unwrap().document_scripts()[0].0, "init");++ // Main added preferences above JavaScript; keep the checkbox inside this test viewport.++ h.set_size(egui::vec2(1400.0, 1400.0));h.state_mut().dialog = Some(Dialog::Preferences);-- h.run_steps(2);++ h.run_steps(4);++ assert!(h.ctx.content_rect().contains_rect(h.get_by_label("Enable Acrobat JavaScript").rect()));h.get_by_label("Enable Acrobat JavaScript").click();h.run_steps(2);assert!(!h.state().session.javascript());diff --cc crates/ui-egui/tests/ui_group/bulk_fields.rsindex b2c75c262,b2c75c262..317327517--- a/crates/ui-egui/tests/ui_group/bulk_fields.rs+++ b/crates/ui-egui/tests/ui_group/bulk_fields.rs@@@ -89,8 -89,8 +89,11 @@@ fn shared_properties_preserve_mixed_valh.state_mut().bulk_field_props.as_mut().unwrap().required.value = true;h.get_by_label("Appearance").click();h.run_steps(4);++ h.get_by_label("Line Thickness:").scroll_to_me();++ h.run_steps(4);h.get_by_label("Line Thickness:").click();h.run_steps(4);++ assert!(h.state().bulk_field_props.as_ref().unwrap().width.apply, "thickness click enables the property");h.state_mut().bulk_field_props.as_mut().unwrap().width.value = 4.0;h.get_by_label("OK").click();h.run_steps(4);diff --cc docs/architecture.mdindex 4e047c10f,eb56cdb3e..a226cc8de--- a/docs/architecture.md+++ b/docs/architecture.md@@@ -1,6 -1,6 +1,6 @@@# PdfCraft architecture- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared print spooler; Windows CI enabled) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (first public architecture document, written from the code on main) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)++> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared print spooler; Windows CI passes) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)How PdfCraft is built today. The design rationale and the planned crates live in`plan/architecture.md` and `plan/adr/` (local-only); this file describes what is on `main`. Eachdiff --cc docs/hardware-parity.mdindex 5c74648d1,81a60be8c..764553ab8--- a/docs/hardware-parity.md+++ b/docs/hardware-parity.md@@@ -1,6 -1,6 +1,6 @@@# Hardware and platform parity- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared print spooler; Windows CI enabled) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Windows printers row and 1:1 touchpad scrolling, #756, #759) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)++> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (shared craft-print spooler with passing Windows CI; Windows printers row and 1:1 touchpad scrolling, #756, #759) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)Each hardware feature Acrobat Pro uses, per platform, ours against Acrobat's. Acrobat runs on macOSand Windows (plus a limited web viewer/editor in Document Cloud); PdfCraft runs on macOS, Windows,@@@ -17,10 -17,10 +17,10 @@@ printing are counted in their feature a| Multi-threaded rendering | yes | yes (render pool, tiles, watchdog) | yes | yes | single thread | `view.render-priority` || HiDPI / Retina | yes | yes | yes, per-monitor DPI v2 (#324, #725) | yes | yes | text blurry at 1080p/1440p (#730) || Multiple monitors | yes, multiple windows | one window | one window; surfaces fit the GPU limit (#577) | one window | n/a | `view.multiple-windows` planned |- | Printers | all, PostScript, printer properties | CUPS via craft-print | Windows PDF raster spooler via craft-print | CUPS via craft-print | **none** | `crates/print/README.md` |-| Printers | all, PostScript, printer properties | CUPS spooler | Windows spooler: lists printers, prints rasterised at the printer's resolution (#756, PR #847) | CUPS spooler | **none** | `crates/print/README.md` |++| Printers | all, PostScript, printer properties | CUPS via craft-print | Windows PDF raster spooler via craft-print (#756, PR #847) | CUPS via craft-print | **none** | `crates/print/README.md` || Scanners (TWAIN, WIA, ICA) | yes | none | none | none (SANE) | n/a | `ocr.scanner-acquire` planned || Smart cards and USB tokens | yes (PKCS #11, CryptoTokenKit, CNG) | Keychain identities (software keys) | CNG store keys, with PIN prompts for cards (#742) | none (PKCS #11 planned) | none | `sign.pkcs11` planned |- | Pen and touch | Touch mode, pen ink, Windows Ink | trackpad pinch zoom; ink from pointer, no pressure | ink from pointer, no pressure or touch mode | as macOS | pointer | touchpad scrolling not 1:1 (#759) |+ | Pen and touch | Touch mode, pen ink, Windows Ink | trackpad pinch zoom; ink from pointer, no pressure | ink from pointer, no pressure or touch mode | as macOS | pointer | touchpad scrolling 1:1 (#759, PR #868) || Keyboard input methods (IME) | yes | yes; Japanese and Korean IME fixes patched into winit | yes (Microsoft Korean cursor fix) | X11 and Wayland IME fixes | browser | `vendor/README.md` winit patches 2–10 || Screen readers | VoiceOver, NVDA, JAWS | AccessKit labels (partial) | AccessKit (partial) | AccessKit (partial) | partial | `a11y.app-screen-reader` partial || Text to speech (Read Out Loud) | yes | none | none | none | none | `a11y.read-aloud` planned |@@@ -42,4 -42,4 +42,5 @@@|---|---|---|| 2026-10-10 | major | Created from the code, `vendor/README.md`, `.github/workflows/release.yml`, the print crate's README and user issues || 2026-10-10 | minor | Windows printing shipped (#756): the Windows row's gap is closed; the web row keeps "printing" |+| 2026-10-11 | minor | Shared craft-print spooler; Windows preserves PDF sheet size/orientation and uses corrected duplex binding edges. Physical output remains a hardware check. |+ | 2026-10-11 | minor | The Printers row's Windows cell still said none: now the Windows spooler (#756, PR #847). Touchpad scrolling 1:1 (#759, PR #868) |