PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Merge r2 track t05: forms
aiongg8724f6b1a574
diff --cc ROADMAP.mdindex 417356715,47931133f..fb9693b2e--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -1,12 -1,8 +1,13 @@@# PdfCraft roadmap+> **Last reviewed:** 2026-10-21 · **Last updated:** 2026-10-21 · **Change:** minor (M3, #3808: the Pages inspector has an independent 50–150% thumbnail size slider and buttons; selection and current-page following are retained, with headless ui.set coverage. Estimates unchanged.)+**Stage: alpha** · next: beta, ~25% (ready for real work 50% → 75%) and ~400–700 h away+> **Last reviewed:** 2026-10-20 · **Last updated:** 2026-10-20 · **Change:** minor (M4: initial-view options resolve indirect boolean preferences; estimates unchanged)+> **Last reviewed:** 2026-10-20 | **Last updated:** 2026-10-20 | **Change:** minor (M2, #3574: named form properties retain page origin and own dictionary boundaries; estimates unchanged)++ > **Last reviewed:** 2026-10-20 - **Last updated:** 2026-10-20 - **Change:** minor (M6, #3502: form detection uses the existing content-stream boundary policy; estimates unchanged)> **Last reviewed:** 2026-10-18 · **Last updated:** 2026-10-18 · **Change:** minor (M5, PR #1971: bounded nested FDF export excludes source page/page-tree dictionaries; refreshed against upstream 4db6ac4a; estimates unchanged)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-15 · **Change:** minor (M7: the Edit text caret is as tall as the row it is on; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-15 · **Change:** minor (M6: CSV tab-containing headers; estimates unchanged)@@@ -177,21 -172,12 +178,23 @@@ Ranked; detail and the full milestone t| 8 | 1.0 polish: performance, right-to-left, missing languages, keyboard-only (M14) | 55–95 |## Progress log+- **2026-10-13 (M7, free image rotation):** A selected page image has a rotate knob (Shift: 15 degree steps) and `image_edit` a `rotate_by` action; the angle is written as one undoable `cm`. Snapping to page edges while moving is in #1740; resize snapping is not done. Estimates unchanged.+- **2026-10-20 (M4, initial view):** Window and interface options read indirect boolean ViewerPreferences values. Synthetic regressions cover true/false, direct/indirect preference dictionaries and save/reopen; malformed entries retain false defaults. Estimates unchanged.+- **2026-10-20 (M3, #3535):** Escape with a menu open closes the menu and keeps the text selection; the next Escape clears it, as before. One keypress used to do both. A synthetic UI regression checks it. Estimates unchanged.+- **2026-10-16 (M3, close prompt keyboard):** The "Save changes?" prompt opens with Save chosen (Enter saves, as before) and the arrow keys and Tab / Shift+Tab move the choice to Cancel or Don't save, shown with a focus ring; Enter or Space press the chosen button and Escape still cancels. Before, Enter always saved whatever was Tab-focused. Estimates unchanged.+- **2026-10-21 (M3, #3808):** Page thumbnails in the Inspector can be resized independently from the document and Organize, with a slider, buttons and `thumbnail-zoom` control option. Selection, page following and reload are covered by regressions. Estimates unchanged.+- **2026-10-22 (M2, #3107 / PR #3438):** Inline-image parsing falls back to the existing EI heuristic when missing declared samples, headers or terminators exceed the content-window budget, instead of waiting for an impossible allocation. Exact-length parsing for available samples and ordinary large streamed images is retained. Estimates unchanged.- **2026-10-20 (M6, calculation order page):** Prepare a form ▸ Calculation order, a page of its own, lists the calculated fields in the order they calculate with their formulas and values, moved with Up/Down arrows (as Acrobat's Set Field Calculation Order), Alt+↑/↓ or by dragging. A card says what is wrong with the order and holds Fix order; a loop has a card of its own that opens one of its formulas. On the page, each calculated field shows its step, and arrows show what the field in focus reads and what reads it. Estimates unchanged.- **2026-10-20 (M6, calculation order):** The order a form's fields calculate in (`/CO`) is read, checked, fixed and set headlessly with `form_calculation_order`: it says which fields read one calculated later (they show stale values), which read each other in a loop, and which the PDF's order leaves out; Fix order moves only what must move, in one undo step, and the form recalculates. Editing a formula no longer moves its field to the end of the order, and a field the order lists twice calculates once. Estimates unchanged.+- **2026-10-20 (M2, #3574):** Forms without Resources use page Properties for ActualText and layer visibility. Synthetic tests cover boundaries, nested/shared forms, and save/reopen. Estimates unchanged.- **2026-10-19 (M6, renames keep formulas):** Renaming a field renames it in every calculation that reads it, in the same undo step: `AFSimple_Calculate` field lists, simplified field notation (the comment and the JavaScript after it) and `getField` calls naming it in one string literal; the rest of each script is kept as written. A sum used to drop the renamed field, notation read it as 0 and a script kept a stale value. Field Properties says how many formulas changed and `form_set_props` lists them as `formulas_updated`. Names built at run time and other events' scripts are not rewritten. Estimates unchanged.+- **2026-10-19 (M7, #3591):** A background added to a page that already has one is painted over the old one instead of going under it and staying hidden. Behind the content, backgrounds come first, in the order added, and then behind-content watermarks, so a watermark added after a background no longer disappears. Synthetic regressions in `crates/edit` check the order. Estimates unchanged.++- **2026-10-16 (M7, #2516):** A paragraph number from `text_paragraphs` keeps naming the paragraph it listed after edits regroup the page: `text_edit`, `text_edit_layout` and `page_render`'s `hide_text_block` find it again by its text and box, and refuse one that was merged into a neighbour (the edited paragraph included) instead of rewriting the paragraph that took its number (`stale_paragraphs` lists the numbers gone). The inline editor's switch-paragraph click holds the same key. No stable identity across save and reopen yet (#2508).+- **2026-10-19 (M2, radial luminosity masks):** Added synthetic radial-fade coverage for the existing masked-gradient fix (#2132): centre, midpoint, antialiased clip and per-pixel shading reference, including previews, scales and tiles. Removing the existing native-gradient mask guard reproduces an opaque midpoint; restoring it passes. No new renderer behavior or estimate change.+ - **2026-10-20 (M6, #3502):** Form detection preserves comments across content streams and does not add fields over rectangles hidden by those comments. Synthetic tests cover visible controls, graphics state, and saved field inventories. Estimates unchanged.+ - **2026-10-20 (M6, #2273 / PR #2279):** Rebased the field-highlight default and Appearance preference onto main, retaining secured-form parity evidence and updating secured AcroForm/XFA toggle expectations. Build and test validation delegated to GitHub CI. Estimates unchanged.- **2026-10-19 (M14, #3373):** The main menu and its long submenus scroll in short windows, keeping their commands reachable. Estimates unchanged.@@@ -232,7 -217,7 +235,8 @@@- **2026-10-15 (M6, AcroForm XML text):** Plain AcroForm XML imports retain all direct text around comments and processing instructions, including CDATA and character references. Synthetic regressions verify exact values and unknown catalog data after incremental and full save/reopen. Nested-element and XFA interpretation are unchanged. Estimates unchanged.- **2026-10-13 (M6, data exchange fidelity):** XML and XFDF exports preserve tabs and line breaks in field names and comment metadata using character references. Saved-PDF regressions cover distinct names that XML would normalize to the same attribute value, restored field values and replacement of the original comment identities. Estimates unchanged.- **2026-10-15 (M12, XFA, #2574):** A `pageArea` with no `<occur>` repeats without limit instead of taking a subform's default of one use, so a later page area with `occur max="1"` is no longer drawn (with a copy of its fields) over every body page. Synthetic regression test; the page area's `occur min` (a once-only page of its own) is still not laid out, recorded in `form.xfa-dynamic`. Estimates unchanged.+- **2026-10-14 (M12, reading colours, #2059):** Pending page backgrounds use the document's reading colour immediately, preventing white flashes while scrolling to uncached pages. A headless canvas regression covers three pending pages in every preset and a custom background. Estimates unchanged.+ - **2026-10-15 (community, M6, #2608):** In Prepare a form the selected field moves with the arrow keys: a point per press, ten with Shift, as the object nudge and dragging it do. Each press is one undo step ("Change field properties"), and the keys no longer turn the page while a field is selected. Estimates unchanged.- **2026-10-13 (community, M3, #1569 review):** Pixel-only Wayland wheel, wheel-tilt and continuous input use standalone moved events, so Ctrl zoom does not remain latched after the modifier is released (#991); vendored winit patch (13), with a policy test. Estimates unchanged.- **2026-10-15 (M14, #2383 candidate):** Device-limit requests now clamp unsupported maxima and minimum alignments before enabling the adapter's full 2D texture extent. This addresses the reported V3D request of 16 shader variables on an adapter supporting 15. Synthetic regressions fail before the clamp and pass afterward, along with the existing HiDPI case and Windows GPU-required application tests. Raspberry Pi startup remains unverified; milestone and overall estimates are unchanged.- **2026-10-12 (M6):** XFDF field import and data-file extraction join all text nodes in a value, preserving text after XML comments and processing instructions. Synthetic regressions cover Unicode, CDATA, empty values and PDF save/reopen. Estimates unchanged.@@@ -578,7 -562,7 +582,8 @@@ Newest first: the date, what moved, an| Date | Change | Summary ||---|---|---|+| 2026-10-20 | minor | M4: initial-view window and interface options resolve indirect boolean ViewerPreferences values; synthetic true/false and save/reopen regressions retain defaults for malformed entries. Estimates unchanged. |+ | 2026-10-20 | minor | M6, #3502: form detection preserves comments across content streams; estimates unchanged. || 2026-10-18 | minor | M5, PR #1971: nested source `/Page` and `/Pages` dictionaries export as null without traversing page content or the page tree. Synthetic saved/reopened three-page regression retains unrelated metadata and aliases. FDF import semantics, copied-graph limits and estimates unchanged. || 2026-10-15 | minor | M5: budget retained FDF entries before cloning; discovery keeps lazy array owners and annotation positions, with alias/cache-eviction stress fixtures. Limits cover the copied graph; source parsing/page discovery retain existing COS/parser limits, with no total source-memory bound. FDF import semantics and estimates unchanged. || 2026-10-15 | minor | M7: the Edit text caret is as tall as the row it is on in a region with several sizes; estimates unchanged. |diff --cc crates/engine/src/tests.rsindex 90d536264,5a5e382e2..57c0177fe--- a/crates/engine/src/tests.rs+++ b/crates/engine/src/tests.rs@@@ -6242,143 -6170,67 +6264,208 @@@ fn undo_never_makes_an_unsaved_documentassert!(!s.get(new).unwrap().dirty, "once saved, undo back to the saved state is clean");}+#[test]+fn undo_and_redo_roll_back_on_a_refresh_panic_or_error() {+ let (mut s, id) = session_with(1);+ s.apply(id, Edit::RotatePages { pages: vec![0], degrees: 90 }).unwrap();+ let (bytes_90, gen_90) = {+ let d = s.get(id).unwrap();+ (d.bytes.clone(), d.generation)+ };++ // 1. A panic during undo's refresh catches the unwind and rolls back cos, undo/redo, info, and working bytes.+ panic_on_refresh(1);+ let err = s.undo(id).unwrap_err();+ assert_eq!(err, EditError::Reopen("injected refresh panic".into()));+ {+ let d = s.get(id).unwrap();+ let ed = d.editor.as_ref().unwrap();+ assert_eq!(d.info.pages[0].rotation, 90);+ assert_eq!(d.bytes, bytes_90);+ assert_eq!(d.generation, gen_90);+ assert!(d.dirty);+ assert!(ed.cos.is_modified());+ assert_eq!(ed.undo.len(), 1);+ assert!(ed.redo.is_empty());+ }+ let _ = shown(&s, id, 0);++ // 2. If the rollback refresh also panics, `show_released` restores the renderer so the page still draws.+ panic_on_refresh(2);+ assert_eq!(s.undo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert_eq!(s.get(id).unwrap().editor.as_ref().unwrap().undo.len(), 1);+ let _ = shown(&s, id, 0);++ // Undo now succeeds cleanly.+ assert_eq!(s.undo(id).unwrap().as_str(), "Rotate page");+ let (bytes_0, gen_0) = {+ let d = s.get(id).unwrap();+ assert_eq!(d.info.pages[0].rotation, 0);+ assert!(!d.dirty);+ (d.bytes.clone(), d.generation)+ };++ // 3. A panic during redo's refresh catches the unwind and rolls back to the undone state.+ panic_on_refresh(1);+ let err = s.redo(id).unwrap_err();+ assert_eq!(err, EditError::Reopen("injected refresh panic".into()));+ {+ let d = s.get(id).unwrap();+ let ed = d.editor.as_ref().unwrap();+ assert_eq!(d.info.pages[0].rotation, 0);+ assert_eq!(d.bytes, bytes_0);+ assert_eq!(d.generation, gen_0);+ assert!(!d.dirty);+ assert!(!ed.cos.is_modified());+ assert!(ed.undo.is_empty());+ assert_eq!(ed.redo.len(), 1);+ }+ let _ = shown(&s, id, 0);++ // 4. If redo's rollback refresh also panics, `show_released` restores the renderer.+ panic_on_refresh(2);+ assert_eq!(s.redo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert_eq!(s.get(id).unwrap().editor.as_ref().unwrap().redo.len(), 1);+ let _ = shown(&s, id, 0);++ // Redo now succeeds cleanly.+ assert_eq!(s.redo(id).unwrap().as_str(), "Rotate page");+ assert_eq!(s.get(id).unwrap().info.pages[0].rotation, 90);++ // 5. Metadata scope: a panic after `doc.info.title` was written rolls back `info.title` and keeps `edit_notices`.+ s.apply(id, Edit::SetInfo { key: "Title".into(), value: "Draft".into() }).unwrap();+ let notice = TextNotice { field: None, page: 0, ch: '☺', redrawn_elsewhere: false };+ s.doc_mut(id).unwrap().edit_notices.push(notice.clone());+ panic_on_refresh(1);+ assert_eq!(s.undo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert_eq!(s.get(id).unwrap().info.title.as_deref(), Some("Draft"));+ assert_eq!(s.get(id).unwrap().edit_notices, [notice]);+ assert_eq!(s.undo(id).unwrap().as_str(), "Change Title");+ assert_eq!(s.get(id).unwrap().info.title, None);+ assert!(s.get(id).unwrap().edit_notices.is_empty());++ panic_on_refresh(1);+ assert_eq!(s.redo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert_eq!(s.get(id).unwrap().info.title, None);+ assert_eq!(s.redo(id).unwrap().as_str(), "Change Title");+ assert_eq!(s.get(id).unwrap().info.title.as_deref(), Some("Draft"));++ // 6. Protection keys: undo/redo rollback restores `editor.keys` and `doc.password` before re-inspecting.+ let protect = Protection { open_password: Some("u".into()), permissions_password: Some("o".into()), ..Protection::default() };+ s.apply(id, Edit::Protect(protect)).unwrap();+ assert!(s.get(id).unwrap().info.encrypted);+ panic_on_refresh(1);+ assert_eq!(s.undo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert!(s.get(id).unwrap().info.encrypted);+ assert_eq!(s.get(id).unwrap().password.as_deref(), Some("u"));+ assert_eq!(s.undo(id).unwrap().as_str(), "Protect with password");+ assert!(!s.get(id).unwrap().info.encrypted);+ assert_eq!(s.get(id).unwrap().password, None);++ panic_on_refresh(1);+ assert_eq!(s.redo(id), Err(EditError::Reopen("injected refresh panic".into())));+ assert!(!s.get(id).unwrap().info.encrypted);+ assert_eq!(s.get(id).unwrap().password, None);+ assert_eq!(s.redo(id).unwrap().as_str(), "Protect with password");+ assert!(s.get(id).unwrap().info.encrypted);+ assert_eq!(s.get(id).unwrap().password.as_deref(), Some("u"));+}++#[test]+fn a_bookmark_added_at_a_point_goes_there_through_undo_and_save() {+ use pdfcraft_render::DestView;+ let (mut s, id) = session_with(3);+ let view = |s: &Session, i: usize| s.get(id).unwrap().info.outline.get(i).map(|o| (o.page, o.view));+ let add = |s: &mut Session, title: &str, page: usize, left: Option<f64>, top: Option<f64>| {+ s.apply(id, Edit::AddBookmark { parent: vec![], index: usize::MAX, title: title.into(), page, left, top })+ };+ add(&mut s, "Plain", 0, None, None).unwrap();+ add(&mut s, "Section", 1, None, Some(500.5)).unwrap();+ add(&mut s, "Table", 2, Some(72.0), Some(300.0)).unwrap();+ // The page top (no position) is what it always was; the others carry their place.+ assert_eq!(view(&s, 0), Some((Some(0), DestView::Xyz { left: None, top: None, zoom: None })));+ assert_eq!(view(&s, 1), Some((Some(1), DestView::Xyz { left: None, top: Some(500.5), zoom: None })));+ assert_eq!(view(&s, 2), Some((Some(2), DestView::Xyz { left: Some(72.0), top: Some(300.0), zoom: None })));++ // A position that is not a number fails the edit, which then changes nothing.+ for (left, top) in [(Some(f64::NAN), None), (None, Some(f64::INFINITY))] {+ assert!(matches!(add(&mut s, "Bad", 0, left, top), Err(EditError::Bookmark(_))), "{left:?} {top:?}");+ }+ assert_eq!(s.get(id).unwrap().info.outline.len(), 3);+ assert_eq!(s.get(id).unwrap().can_undo(), Some("Add bookmark"));++ s.undo(id).unwrap();+ assert_eq!(s.get(id).unwrap().info.outline.len(), 2);+ s.redo(id).unwrap();+ let saved = s.save_bytes(id).unwrap();+ let mut again = Session::new();+ let id2 = again.open("again.pdf", None, saved, None).unwrap();+ let outline = &again.get(id2).unwrap().info.outline;+ assert_eq!(outline[2].view, DestView::Xyz { left: Some(72.0), top: Some(300.0), zoom: None });+ assert_eq!(outline[1].view, DestView::Xyz { left: None, top: Some(500.5), zoom: None });+}+++ /// #3470: a filled form whose writer left the appearances to the viewer (`/NeedAppearances`):+ /// field A has an empty appearance, B none. The page as displayed (and printed) shows both+ /// values, and a comment without an appearance beside them still gets its own; the file itself+ /// is not changed, so saving writes it as it was.+ #[test]+ fn fields_left_to_the_viewer_are_displayed_from_their_values() {+ let pdf = |need: bool| {+ let flag = if need { "/NeedAppearances true " } else { "" };+ format!(+ "%PDF-1.7\n\+ 1 0 obj << /Type /Catalog /Pages 2 0 R /AcroForm 5 0 R >> endobj\n\+ 2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj\n\+ 3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 400 200] /Annots [6 0 R 7 0 R 10 0 R] >> endobj\n\+ 10 0 obj << /Type /Annot /Subtype /Square /Rect [360 20 390 50] /C [1 0 0] /BS << /W 4 >> >> endobj\n\+ 5 0 obj << /Fields [6 0 R 7 0 R] {flag}/DA (/Helv 0 Tf 0 g) /DR << /Font << /Helv 8 0 R >> >> >> endobj\n\+ 6 0 obj << /Type /Annot /Subtype /Widget /FT /Tx /T (a) /V (MMMMMMMM) /DA (/Helv 12 Tf 0 g) /Rect [50 120 350 140] /F 4 /P 3 0 R /AP << /N 9 0 R >> >> endobj\n\+ 7 0 obj << /Type /Annot /Subtype /Widget /FT /Tx /T (b) /V (MMMMMMMM) /DA (/Helv 12 Tf 0 g) /Rect [50 60 350 80] /F 4 /P 3 0 R >> endobj\n\+ 8 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj\n\+ 9 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 20] /Length 4 >> stream\nq\nQ\nendstream endobj\n\+ trailer << /Root 1 0 R >>\n%%EOF"+ )+ .into_bytes()+ };+ let red = |s: &Session, id: DocId| {+ let doc = s.get(id).unwrap();+ let mut r = pdfcraft_render::PageRenderer::new(doc.display.clone(), doc.config.clone());+ let page = r.render(pdfcraft_render::RenderRequest { page: 0, scale: 1.0, ..Default::default() });+ page.rgba.as_chunks::<4>().0.iter().filter(|p| p[0] > 200 && p[1] < 80 && p[2] < 80).count()+ };+ // Dark pixels inside a field's box (user-space rectangle, page drawn at scale 1).+ let ink = |s: &Session, id: DocId, y0: u32, y1: u32| {+ let doc = s.get(id).unwrap();+ let mut r = pdfcraft_render::PageRenderer::new(doc.display.clone(), doc.config.clone());+ let page = r.render(pdfcraft_render::RenderRequest { page: 0, scale: 1.0, ..Default::default() });+ let (px, _) = page.rgba.as_chunks::<4>();+ (200 - y1..200 - y0)+ .flat_map(|y| (55..345).map(move |x| (x, y)))+ .filter(|&(x, y)| px.get((y * page.width + x) as usize).is_some_and(|p| p[0] < 128))+ .count()+ };+ let mut s = Session::new();+ let id = s.open("form.pdf", None, Arc::new(pdf(true)), None).unwrap();+ let (a, b) = (ink(&s, id, 122, 138), ink(&s, id, 62, 78));+ assert!(a > 100 && b > 100, "both values are shown: a {a}, b {b}");+ assert!(red(&s, id) > 100, "the comment is drawn too");+ // The file is saved as it was: B still has no appearance, A its empty one.+ let saved = pdfcraft_cos::Document::open(s.save_bytes(id).unwrap()).unwrap();+ let fields = pdfcraft_forms::fields(&saved);+ let widget = |name: &str| saved.get(fields.iter().find(|f| f.name == name).unwrap().widgets[0].obj);+ assert!(widget("b").as_dict().is_some_and(|d| !d.contains(b"AP")), "B has no appearance");+ let n = widget("a").as_dict().and_then(|d| d.get(b"AP").and_then(|ap| saved.resolve(ap).as_dict().and_then(|ap| ap.reference(b"N")))).unwrap();+ let pdfcraft_cos::Object::Stream(n) = &*saved.get(n) else { panic!("A's appearance is a stream") };+ assert_eq!(n.decoded().unwrap().trim_ascii_end(), b"q\nQ", "A keeps its empty appearance");+ // Typing in one field redraws that field only, not the whole form, on each keystroke.+ let builds = |s: &Session| s.get(id).unwrap().editor.as_ref().unwrap().field_appearances.builds();+ let before = builds(&s);+ s.apply(id, Edit::SetFieldValue { name: "a".into(), value: pdfcraft_forms::FieldValue::Text("Typed".into()) }).unwrap();+ assert_eq!(builds(&s), before + 1);++ // Without the flag, the empty appearance is the file's own, and only B is drawn.+ let id = s.open("form.pdf", None, Arc::new(pdf(false)), None).unwrap();+ let (a, b) = (ink(&s, id, 122, 138), ink(&s, id, 62, 78));+ assert!(a == 0 && b > 100, "a {a}, b {b}");+ }diff --cc crates/ui-egui/src/canvas.rsindex 69fbdb094,fd07b07ba..28a8a2049--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@@ -2447,9 -2291,8 +2451,9 @@@ pub fn shortcuts(view: &mut DocView, ctif pressed(cmd(Key::CloseBracket)) {view.view_history(true);}- let key = |k| ctx.input(|i| i.key_pressed(k));+ let key = |k| (arrows || !matches!(k, Key::ArrowLeft | Key::ArrowRight | Key::ArrowUp | Key::ArrowDown)) && ctx.input(|i| i.key_pressed(k));- if key(Key::Escape) {+ // An open menu takes Escape first and closes; the selection stays for the next one (#3535).+ if key(Key::Escape) && !egui::Popup::is_any_open(ctx) {if view.camera.is_some() || view.camera_done.is_some() {view.pending_action = Some(ViewAction::CancelCamera);} else if view.selection.is_some() {diff --cc crates/ui-egui/src/forms_ui.rsindex d5edb214c,890aeb95c..76e092672--- a/crates/ui-egui/src/forms_ui.rs+++ b/crates/ui-egui/src/forms_ui.rs@@@ -135,16 -170,13 +170,17 @@@ pub(crate) fn page_input// Empty signature fields are signed by clicking them (Use a certificate); push buttons run// their action.let pressable = f.kind == FormFieldKind::PushButton && !f.read_only() && f.button.is_some();- let usable = allowed && (fillable(f) || pressable || f.kind == FormFieldKind::Signature);+ // A radio button of a group can be read-only on its own.+ let usable = allowed && !w.read_only && (fillable(f) || pressable || f.kind == FormFieldKind::Signature);- ui.ctx().set_cursor_icon(match (usable, f.kind) {- (false, _) => egui::CursorIcon::NotAllowed,- (true, FormFieldKind::Text) => egui::CursorIcon::Text,- _ => egui::CursorIcon::PointingHand,- });+ // Only where the page shows: the mode bar and side panels over a field scrolled under them+ // keep their own cursor (#2755).+ if resp.contains_pointer() {+ ui.ctx().set_cursor_icon(match (usable, f.kind) {+ (false, _) => egui::CursorIcon::NotAllowed,+ (true, FormFieldKind::Text) => egui::CursorIcon::Text,+ _ => egui::CursorIcon::PointingHand,+ });+ }// A text field opens on the press rather than the click, so a drag that starts on it// selects its text (#2213).let pressed = f.kind == FormFieldKind::Text && usable && resp.is_pointer_button_down_on() && ui.input(|i| i.pointer.primary_pressed());diff --cc crates/ui-egui/src/lib.rsindex 7b228e3ec,db771c8cc..8b5295e5a--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -2985,9 -2868,15 +2985,16 @@@ impl PdfCraftApp{object_ui::nudge_keys(ctx, &mut self.views[i], doc);}+ // A selected field moves with the arrows too (Prepare a form, #2608), before the view+ // turns the page with them.+ if self.is_preparing()+ && let Some(doc) = self.session.get(self.views[i].id).filter(|d| d.allows_modification())+ {+ prepare::nudge_keys(ctx, &mut self.views[i], doc);+ }canvas::shortcuts(&mut self.views[i], ctx, self.scroll_speed);self.copy_key(i, ctx);+ self.paste_image_key(i, ctx, pasted);self.image_pick_keys(i, ctx);}}diff --cc docs/roadmap.mdindex 35252fdcb,528c2a7a6..856aa6bd2--- a/docs/roadmap.md+++ b/docs/roadmap.md@@@ -1,11 -1,8 +1,12 @@@# PdfCraft roadmap: milestones and what's next+> **Last reviewed:** 2026-10-20 · **Last updated:** 2026-10-20 · **Change:** minor (M4: initial-view options resolve indirect boolean preferences; estimates unchanged)+> **Last reviewed:** 2026-10-21 · **Last updated:** 2026-10-21 · **Change:** minor (M3, #3808: the Pages inspector has an independent 50–150% thumbnail size slider and buttons; selection and current-page following are retained, with headless ui.set coverage. Estimates unchanged.)+> **Last reviewed:** 2026-10-20 | **Last updated:** 2026-10-20 | **Change:** minor (M2, #3574: named form properties retain page origin and own dictionary boundaries; estimates unchanged)+> **Last reviewed:** 2026-10-18 · **Last updated:** 2026-10-18 · **Change:** minor (M5, PR #1971: bounded nested FDF export excludes source page/page-tree dictionaries; refreshed against upstream 4db6ac4a; estimates unchanged)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-15 · **Change:** minor (M14/#2383 GPU-limit candidate; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)+ > **Last reviewed:** 2026-10-20 - **Last updated:** 2026-10-20 - **Change:** minor (M6, #3502: form detection uses the existing content-stream boundary policy; estimates unchanged)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-15 · **Change:** minor (M7: the Edit text caret is as tall as the row it is on; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-15 · **Change:** minor (M6: CSV tab-containing headers; estimates unchanged)> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-18 · **Change:** minor (M4, #1919: repeated page indices accumulate rotations; M4: indirect page rotations refreshed upstream; M13: CLI check visits each directory once through aliases and cycles; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)diff --cc docs/ui-parity.mdindex 9f2d0fd5d,93cc83086..c12461793--- a/docs/ui-parity.md+++ b/docs/ui-parity.md@@@ -1,6 -1,6 +1,6 @@@# UI and interaction parity- > **Last reviewed:** 2026-10-21 · **Last updated:** 2026-10-21 · **Change:** minor (Pages inspector thumbnail size slider and buttons #3808; full screen presents one page at a time #1459) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-15 · **Change:** minor (the selected field nudges with the arrow keys in Prepare a form, #2608) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)++> **Last reviewed:** 2026-10-21 · **Last updated:** 2026-10-21 · **Change:** minor (Pages inspector thumbnail size slider and buttons #3808; full screen presents one page at a time #1459; the selected field nudges with the arrow keys in Prepare a form #2608) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)How PdfCraft's tools, panels, shortcuts and feel compare with Acrobat Pro's current interface (the2023+ "new Acrobat": All tools pane on the left, quick-action toolbar, Home view). Behaviour is@@@ -81,7 -81,6 +81,8 @@@ No dump of Acrobat's menu tree has bee| Date | Change | Summary ||---|---|---|+| 2026-10-21 | minor | Pages inspector thumbnail sizing (#3808), separate from page and Organize zoom; view setting retained on reload and exposed through UI control. Not persisted between sessions. |+ | 2026-10-15 | minor | A selected field nudges with the arrow keys in Prepare a form: a point, Shift ten points, one undo step per press (#2608) |+| 2026-10-14 | minor | Full screen shows one fitted page (or spread) at a time on black with click and key paging, as Acrobat's Full Screen Mode (#379, #1459, #1353) || 2026-10-11 | minor | Column select shipped (#740, PR #765); several objects move together on one page (#844, PR #907); Shift-⌘-G goes back (#810, PR #835) || 2026-10-10 | major | Created from the command registry, automation tools, the View area of the checklist and open UI issues |