Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

Merge r2 track t06: annotations-comments

aiongga2c46a92982b
diff --cc ROADMAP.md
index fb9693b2e,691b50b0b..bacdc6e33
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@@ -1,13 -1,10 +1,14 @@@
# 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.)
+ > **Last reviewed:** 2026-10-16; **Last updated:** 2026-10-16; **Change:** minor (M5 #2669, item 5: reply groups and page root counts per frame; 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-20 · **Last updated:** 2026-10-20 · **Change:** minor (M3, #3541/#3620: comment hover follows individual marked lines and original annotation paint order; 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)
@@@ -178,23 -174,14 +179,27 @@@ 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-20 (M5, reshape lines):** A line or arrow could only be moved after it was drawn; its length and angle stayed. A selected line, connected lines, polygon or cloud now has a handle on each end or corner: dragging one reshapes it (Shift holds it to 45°), as one undo step, with the new shape drawn while dragging. `pdfcraft_annot::set_points`, `Edit::ReshapeAnnotation`, `comment_edit points`; comment lists carry the points. Estimates unchanged.
+ - **2026-10-20 (M3, #3620):** Overlapping comment hover uses the original annotation index independently of spatial inspection order. A synthetic UI regression covers different annotation upper edges. Estimates unchanged.
+
+ - **2026-10-20 (M3, #3541/#3620):** Comment hover follows the individual marked lines instead of the enclosing multiline rectangle, and overlapping comments follow paint order. Synthetic UI regressions cover all four text-markup kinds, page/view rotations, neighboring highlights, legacy rectangle fallback and unchanged PDF bytes. Estimates unchanged.
- **2026-10-19 (M14, #3373):** The main menu and its long submenus scroll in short windows, keeping their commands reachable. Estimates unchanged.
diff --cc crates/automation/tests/automation.rs
index 2ad986628,4fb9ca91b..9b84ddb07
--- a/crates/automation/tests/automation.rs
+++ b/crates/automation/tests/automation.rs
@@@ -7155,250 -7028,20 +7209,268 @@@ fn text_box_and_callout_fill_and_border
}
}
+/// Three paragraphs: Alpha (two rows), Bravo (one row) and Charlie (two rows), at the leading
+/// of #2516. A third Alpha row brings its last baseline within 2.5 × size of Bravo's, so the next
+/// read groups the two as one paragraph.
+fn three_paragraph_pdf() -> Vec<u8> {
+ use pdfcraft_cos::{Dict, Document, ObjRef, Object, SaveOptions, Stream, write_full};
+ use std::sync::Arc;
+
+ let content = "BT /F1 12 Tf 14.4 TL 1 0 0 1 10 250 Tm (Alpha paragraph, first row.) Tj T* (Alpha paragraph, second row.) Tj ET \
+ BT /F1 12 Tf 14.4 TL 1 0 0 1 10 200 Tm (Bravo paragraph, a single row.) Tj ET \
+ BT /F1 12 Tf 14.4 TL 1 0 0 1 10 150 Tm (Charlie paragraph, first row.) Tj T* (Charlie paragraph, second row.) Tj ET";
+ let mut doc = Document::open(Arc::new(fixture(1))).unwrap();
+ doc.set(ObjRef::new(5, 0), Object::Stream(Stream::flate(Dict::new(), content.as_bytes())));
+ write_full(&doc, &SaveOptions::default()).unwrap()
+}
+
+/// A one-page PDF whose second paragraph is drawn over the first one's box, as an OCR text layer
+/// or a stamp would be.
+fn overlaid_paragraph_pdf() -> Vec<u8> {
+ use pdfcraft_cos::{Dict, Document, ObjRef, Object, SaveOptions, Stream, write_full};
+ use std::sync::Arc;
+
+ let content = "BT /F1 12 Tf 14.4 TL 1 0 0 1 10 250 Tm (Alpha paragraph, first row.) Tj T* (Alpha paragraph, second row.) Tj ET \
+ BT /F1 12 Tf 14.4 TL 1 0 0 1 10 243 Tm (Zulu overlay.) Tj ET";
+ let mut doc = Document::open(Arc::new(fixture(1))).unwrap();
+ doc.set(ObjRef::new(5, 0), Object::Stream(Stream::flate(Dict::new(), content.as_bytes())));
+ write_full(&doc, &SaveOptions::default()).unwrap()
+}
+
+/// Emptying a paragraph that another paragraph overlaps must not hand the emptied paragraph's
+/// number to the neighbour that took over its box: the next edit by that number would rewrite it.
+#[test]
+fn an_emptied_paragraph_does_not_pass_its_number_to_an_overlapping_neighbour() {
+ let dir = workdir("text-edit-overlap-number");
+ std::fs::write(dir.join("p.pdf"), overlaid_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ let listed = ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ assert_eq!(listed["count"], 2, "{listed}");
+ let k = listed["paragraphs"].as_array().unwrap().iter().position(|p| p["text"].as_str().unwrap().starts_with("Alpha")).unwrap() + 1;
+
+ let first = ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":k,"text":""}));
+ assert_eq!(first["stale_paragraphs"], json!([k]), "the emptied paragraph's number is gone: {first}");
+ let again = a.call("text_edit", &json!({"doc":doc,"page":1,"paragraph":k,"text":"Rewritten."}));
+ assert!(matches!(&again, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{again:?}");
+ assert!(page_text(&mut a, doc).join(" ").contains("Zulu overlay."), "the neighbour is untouched");
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// #2516: a paragraph number names the paragraph `text_paragraphs` listed. When an edit regroups
+/// the page so that paragraph no longer exists on its own, the next edit by that number is
+/// refused. It used to rewrite whichever paragraph had taken the number, and that text was gone.
+#[test]
+fn text_edit_refuses_a_paragraph_number_an_earlier_edit_regrouped() {
+ let dir = workdir("text-edit-stale-number");
+ std::fs::write(dir.join("p.pdf"), three_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ let listed = ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ assert_eq!(listed["count"], 3);
+ assert!(listed["paragraphs"][1]["text"].as_str().unwrap().starts_with("Bravo"));
+
+ // Listing again here would renumber the page, so the first edit's result says what moved.
+ let first = ok(
+ &mut a,
+ "text_edit",
+ json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha paragraph, first row.\nAlpha paragraph, second row.\nAlpha paragraph, a third row."}),
+ );
+ assert_eq!(first["stale_paragraphs"], json!([1, 2]), "the third row regroups Alpha with Bravo: {first}");
+
+ // Paragraph 2 of the earlier listing was Bravo, which is now part of Alpha's paragraph.
+ let stale = a.call("text_edit", &json!({"doc":doc,"page":1,"paragraph":2,"text":"Bravo paragraph, edited."}));
+ assert!(matches!(&stale, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{stale:?}");
+ let text = page_text(&mut a, doc).join(" ");
+ assert!(text.contains("Charlie paragraph, first row."), "Charlie is untouched: {text}");
+ assert!(text.contains("Charlie paragraph, second row."), "Charlie is untouched: {text}");
+ assert!(!text.contains("Bravo paragraph, edited."), "nothing was rewritten: {text}");
+
+ // After listing again, the number names what the listing says.
+ let relisted = ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ assert!(relisted["paragraphs"][1]["text"].as_str().unwrap().starts_with("Charlie"));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":2,"text":"Charlie paragraph, edited."}));
+ let text = page_text(&mut a, doc).join(" ");
+ assert!(text.contains("Charlie paragraph, edited.") && text.contains("Alpha paragraph, a third row."), "{text}");
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// An edit that merges its paragraph into a neighbour leaves no paragraph of its own to follow:
+/// the merged one holds the edited text too, but rewriting it by the edited paragraph's number
+/// would drop the neighbour's text (#2516).
+#[test]
+fn text_edit_does_not_follow_a_paragraph_into_the_one_it_merged_with() {
+ let dir = workdir("text-edit-merged-number");
+ std::fs::write(dir.join("p.pdf"), three_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ let first = ok(
+ &mut a,
+ "text_edit",
+ json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha paragraph, first row.\nAlpha paragraph, second row.\nAlpha paragraph, a third row."}),
+ );
+ assert!(first.get("paragraph").is_none(), "the result must not present the merged paragraph as the edited one: {first}");
+
+ // Paragraph 1 was Alpha. Alpha now shares a paragraph with Bravo, so the number is refused.
+ let again = a.call("text_edit", &json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha only."}));
+ assert!(matches!(&again, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{again:?}");
+ let text = page_text(&mut a, doc).join(" ");
+ assert!(text.contains("Bravo paragraph, a single row."), "Bravo is untouched: {text}");
+ assert!(!text.contains("Alpha only."), "nothing was rewritten: {text}");
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// The editor background preview takes the same paragraph number as `text_edit`, so it hides the
+/// paragraph the number named in the listing and refuses a number an edit made stale (#2516).
+#[test]
+fn page_render_hide_text_block_refuses_a_paragraph_number_an_earlier_edit_regrouped() {
+ let dir = workdir("hide-text-block-stale-number");
+ std::fs::write(dir.join("p.pdf"), three_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ ok(
+ &mut a,
+ "text_edit",
+ json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha paragraph, first row.\nAlpha paragraph, second row.\nAlpha paragraph, a third row."}),
+ );
+
+ // Paragraph 2 of the listing was Bravo, now inside Alpha's paragraph; position 2 is Charlie.
+ let stale = a.call("page_render", &json!({"doc":doc,"page":1,"dpi":72,"hide_text_block":2}));
+ assert!(matches!(&stale, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{:?}", stale.map(|_| ()));
+ // Paragraph 3 of the listing is Charlie, wherever it is now.
+ assert!(a.call("page_render", &json!({"doc":doc,"page":1,"dpi":72,"hide_text_block":3})).is_ok());
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// The listings kept for paragraph numbers are capped. A page whose listing was dropped must not
+/// fall back to reading its numbers as positions, which an edit may have regrouped: it is refused
+/// until the page is listed again (#2516).
+#[test]
+fn text_edit_refuses_a_paragraph_number_whose_listing_was_dropped_at_the_cap() {
+ let dir = workdir("text-edit-evicted-listing");
+ std::fs::write(dir.join("p.pdf"), three_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let open = |a: &mut Automation| ok(a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ let doc = open(&mut a);
+ ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ // 256 more pages fill the cap, so the next new page drops every earlier listing.
+ let others: Vec<u64> = (0..256).map(|_| open(&mut a)).collect();
+ for &other in &others {
+ ok(&mut a, "text_paragraphs", json!({"doc":other,"page":1}));
+ }
+
+ let dropped = a.call("text_edit", &json!({"doc":doc,"page":1,"paragraph":2,"text":"Bravo paragraph, edited."}));
+ assert!(matches!(&dropped, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{dropped:?}");
+ assert!(!page_text(&mut a, doc).join(" ").contains("Bravo paragraph, edited."), "nothing was rewritten");
+ let hidden = a.call("page_render", &json!({"doc":doc,"page":1,"dpi":72,"hide_text_block":2}));
+ assert!(matches!(&hidden, Err(ToolError::InvalidArgs(m)) if m.contains("text_paragraphs")), "{:?}", hidden.map(|_| ()));
+
+ // A page listed after the drop keeps its numbers, and so does the page once it is listed again.
+ ok(&mut a, "text_edit", json!({"doc":others[255],"page":1,"paragraph":2,"text":"Bravo paragraph, edited."}));
+ ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":2,"text":"Bravo paragraph, edited."}));
+ assert!(page_text(&mut a, doc).join(" ").contains("Bravo paragraph, edited."));
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// A number from the listing keeps naming its paragraph while other paragraphs are edited, and
+/// a paragraph can be edited twice in a row by the same number.
+#[test]
+fn text_edit_numbers_survive_edits_that_do_not_regroup() {
+ let dir = workdir("text-edit-stable-number");
+ std::fs::write(dir.join("p.pdf"), three_paragraph_pdf()).unwrap();
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({"path":"p.pdf"}))["doc"].as_u64().unwrap();
+ ok(&mut a, "text_paragraphs", json!({"doc":doc,"page":1}));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":3,"text":"Charlie one.\nCharlie two."}));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha one.\nAlpha two."}));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":1,"text":"Alpha again.\nAlpha two."}));
+ ok(&mut a, "text_edit", json!({"doc":doc,"page":1,"paragraph":3,"text":"Charlie once more.\nCharlie two."}));
+ // A rewrite rewraps at the width of the widest row, so compare without line breaks.
+ let text = page_text(&mut a, doc).join(" ").split_whitespace().collect::<Vec<_>>().join(" ");
+ for want in ["Alpha again.", "Bravo paragraph, a single row.", "Charlie once more."] {
+ assert!(text.contains(want), "{want}: {text}");
+ }
+ std::fs::remove_dir_all(dir).unwrap();
+}
+
+/// Where the first bookmark on `path` goes, as `bookmark_list` reports it: points from the
+/// top-left of the displayed page.
+fn bookmark_destination(a: &mut Automation, doc: u64, title: &str) -> Value {
+ let list = ok(a, "bookmark_list", json!({ "doc": doc }))["bookmarks"].clone();
+ let row = list.as_array().unwrap().iter().find(|r| r["title"] == title).unwrap_or_else(|| panic!("{title} in {list}"));
+ row["destination"].clone()
+}
+
+#[test]
+fn a_bookmark_added_at_a_position_reports_the_same_position_back_on_any_page_rotation() {
+ let dir = workdir("bookmark-position");
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({ "path": "a.pdf" }))["doc"].as_u64().unwrap();
+ ok(&mut a, "page_rotate", json!({ "doc": doc, "pages": [3], "degrees": 90 }));
+ let near = |v: &Value, want: Option<f64>, what: &str| match want {
+ Some(w) => assert!((v.as_f64().unwrap_or_else(|| panic!("{what}: {v}")) - w).abs() < 0.05, "{what}: {v} vs {w}"),
+ None => assert!(v.is_null(), "{what}: {v}"),
+ };
+ // Page 1 upright, page 3 turned a quarter: a displayed top and left come back as given.
+ for (page, title) in [(1, "Upright"), (3, "Turned")] {
+ for (suffix, left, top) in [(" both", Some(72.5), Some(120.25)), (" top", None, Some(200.0)), (" left", Some(50.0), None)] {
+ let name = format!("{title}{suffix}");
+ let mut args = json!({ "doc": doc, "title": name, "page": page });
+ if let Some(l) = left {
+ args["left"] = json!(l);
+ }
+ if let Some(t) = top {
+ args["top"] = json!(t);
+ }
+ ok(&mut a, "bookmark_add", args);
+ let d = bookmark_destination(&mut a, doc, &name);
+ assert_eq!(d["fit"], "XYZ", "{name}");
+ near(&d["left"], left, &format!("{name} left"));
+ near(&d["top"], top, &format!("{name} top"));
+ assert!(d["zoom"].is_null(), "the zoom is kept: {name}");
+ }
+ }
+ // No position is the page top at the reader's zoom, as before.
+ ok(&mut a, "bookmark_add", json!({ "doc": doc, "title": "Plain", "page": 2 }));
+ let plain = bookmark_destination(&mut a, doc, "Plain");
+ assert!(plain["left"].is_null() && plain["top"].is_null() && plain["zoom"].is_null(), "{plain}");
+
+ // A position that is not a usable number is refused and adds nothing.
+ let before = ok(&mut a, "bookmark_list", json!({ "doc": doc }))["bookmarks"].clone();
+ for bad in [json!("high"), json!(2_000_000), json!(-2_000_000.5), json!(true)] {
+ for key in ["top", "left"] {
+ let args = json!({ "doc": doc, "title": "Bad", "page": 1, key: bad });
+ assert!(matches!(a.call("bookmark_add", &args), Err(ToolError::InvalidArgs(_))), "{key} {bad}");
+ }
+ }
+ assert_eq!(ok(&mut a, "bookmark_list", json!({ "doc": doc }))["bookmarks"], before, "nothing was added");
+
+ // It survives a save and reopen.
+ ok(&mut a, "doc_save", json!({ "doc": doc, "path": "placed.pdf" }));
+ let mut b = auto(&dir);
+ let re = ok(&mut b, "doc_open", json!({ "path": "placed.pdf" }))["doc"].as_u64().unwrap();
+ let d = bookmark_destination(&mut b, re, "Turned both");
+ near(&d["left"], Some(72.5), "reopened left");
+ near(&d["top"], Some(120.25), "reopened top");
+}
++
+ /// `comment_edit points` reshapes a line, connected lines or a polygon, in one undo step, and
+ /// `comment_list` reports the points it takes.
+ #[test]
+ fn comments_are_reshaped_through_the_tool() {
+ let dir = workdir("reshape");
+ let mut a = auto(&dir);
+ let doc = ok(&mut a, "doc_open", json!({ "path": "a.pdf" }))["doc"].as_u64().unwrap();
+ ok(&mut a, "comment_add", json!({ "doc": doc, "page": 1, "type": "line", "from": [20, 40], "to": [120, 40] }));
+ let list = ok(&mut a, "comment_list", json!({ "doc": doc, "page": 1 }));
+ assert_eq!(list["comments"][0]["points"], json!([[20.0, 40.0], [120.0, 40.0]]));
+ ok(&mut a, "comment_edit", json!({ "doc": doc, "page": 1, "index": 1, "points": [[20, 40], [20, 140]] }));
+ let list = ok(&mut a, "comment_list", json!({ "doc": doc, "page": 1 }));
+ assert_eq!(list["comments"][0]["points"], json!([[20.0, 40.0], [20.0, 140.0]]));
+ assert_eq!(ok(&mut a, "edit_undo", json!({ "doc": doc }))["undone"], "Reshape comment");
+ assert!(a.call("comment_edit", &json!({ "doc": doc, "page": 1, "index": 1, "points": [[1, 2]] })).is_err(), "a line has two ends");
+ assert!(matches!(a.call("comment_edit", &json!({ "doc": doc, "page": 1, "index": 1, "points": "no" })), Err(ToolError::InvalidArgs(_))));
+ }
diff --cc crates/render/src/raster.rs
index bcb705047,24d728984..4fd044086
--- a/crates/render/src/raster.rs
+++ b/crates/render/src/raster.rs
@@@ -6562,258 -6172,46 +6566,298 @@@ trailer << /Root 1 0 R >
assert_eq!(pixel(&on, 150, 55), &[255, 255, 255, 255], "the image's white quadrant stays white");
}
+ /// #2975: a stencil mask (`/ImageMask true`) is painted in the fill colour at the fill
+ /// opacity, once: at `ca 0.5` it is as opaque as a rectangle filled at `ca 0.5` beside it
+ /// (it was a quarter as opaque, the opacity applied by both the image's group and its paint).
+ /// The same holds when the fill is a pattern, whose paint keeps the opacity in force when it
+ /// was set with `scn`: an uncoloured tiling pattern and a shading pattern.
+ #[test]
+ fn stencil_masks_are_drawn_at_the_fill_opacity_once() {
+ let px = |p: &RenderedPage, x: u32, y: u32| p.rgba[((y * p.width + x) * 4) as usize..][..3].to_vec();
+ let fills = [("colour", "0 0 1 rg"), ("uncoloured tiling pattern", "/CsP cs 0 0 1 /Tp scn"), ("shading pattern", "/Pattern cs /Sp scn")];
+ for (fill_name, fill) in fills {
+ for alpha in ["1", "0.5", "0.25"] {
+ let content = format!("/A gs {fill} q 100 0 0 100 20 50 cm /Msk Do Q 160 50 100 100 re f");
+ let tile = "0 0 10 10 re f";
+ let pdf = format!(
+ "%PDF-1.7
+1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj
+2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj
+3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 300 200] /Contents 4 0 R /Resources << /ExtGState << /A << /ca {alpha} >> >> /XObject << /Msk 5 0 R >> /ColorSpace << /CsP [/Pattern /DeviceRGB] >> /Pattern << /Tp 6 0 R /Sp 7 0 R >> >> >> endobj
+4 0 obj << /Length {} >> stream
+{content}
+endstream endobj
+5 0 obj << /Type /XObject /Subtype /Image /Width 2 /Height 2 /ImageMask true /Length 2 >> stream
+\0\0
+endstream endobj
+6 0 obj << /Type /Pattern /PatternType 1 /PaintType 2 /TilingType 1 /BBox [0 0 10 10] /XStep 10 /YStep 10 /Resources << >> /Length {} >> stream
+{tile}
+endstream endobj
+7 0 obj << /Type /Pattern /PatternType 2 /Shading << /ShadingType 2 /ColorSpace /DeviceRGB /Coords [0 0 300 0] /Extend [true true] /Function << /FunctionType 2 /Domain [0 1] /C0 [0 0 1] /C1 [0 0 1] /N 1 >> >> >> endobj
+trailer << /Root 1 0 R >>
+%%EOF",
+ content.len(),
+ tile.len()
+ );
+ let p = PageRenderer::new(Arc::new(pdf.into_bytes()), RenderConfig::default()).render(RenderRequest {
+ page: 0,
+ kind: RequestKind::Pixels,
+ tile: None,
+ scale: 1.0,
+ tag: 0,
+ ..Default::default()
+ });
+ assert!(p.error.is_none(), "{fill_name}, ca {alpha}: {:?}", p.error);
+ // Pixel rows run top down: PDF (70, 100) is in the mask, (210, 100) in the rectangle.
+ let (mask, rect) = (px(&p, 70, 100), px(&p, 210, 100));
+ assert!(rect != [255, 255, 255], "{fill_name}, ca {alpha}: the rectangle is painted");
+ assert!(mask.iter().zip(&rect).all(|(m, r)| m.abs_diff(*r) <= 1), "{fill_name}, ca {alpha}: mask {mask:?}, rectangle {rect:?}");
+ }
+ }
+ }
+
+ /// #2971: in a knockout transparency group (`/K true`) each element composites with the
+ /// group's initial backdrop, not with the elements drawn before it in the group, over the
+ /// element's shape. A blue square at 50 % opacity over a red one at 50 % shows only the blue
+ /// where they overlap; without `/K` the two blend. The same holds for an image (its shape
+ /// is its rectangle; a soft-masked image's shape is its mask, so its transparent part leaves
+ /// what is under it) and for a nested group (its shape is the union of its elements'
+ /// shapes, while its own elements still blend with each other).
+ #[test]
+ fn knockout_groups_replace_what_their_elements_cover() {
+ let render_as = |group: &str, form: &str, preview: bool| {
+ let pdf = format!(
+ "%PDF-1.7
+1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj
+2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj
+3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 300 200] /Contents 4 0 R /Resources << /XObject << /Fm1 5 0 R >> /ExtGState << /G << /ca 0.5 >> >> >> >> endobj
+4 0 obj << /Length 39 >> stream
+/Fm1 Do /G gs 0 1 0 rg 10 10 30 30 re f
+endstream endobj
+5 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency {group} >> /Resources << /ExtGState << /A << /ca 0.5 >> >> /XObject << /In 6 0 R /Msk 7 0 R /Neu 8 0 R /Img 9 0 R /Sm 10 0 R /Nimg 12 0 R /Deep 13 0 R /Shg 16 0 R /Big 17 0 R >> >> /Length {} >> stream
+{form}
+endstream endobj
+6 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Resources << /ExtGState << /A << /ca 0.5 >> >> >> /Length 34 >> stream
+/A gs 0 0 1 rg 100 50 150 120 re f
+endstream endobj
+7 0 obj << /Type /XObject /Subtype /Image /Width 2 /Height 2 /ImageMask true /Filter /ASCIIHexDecode /Length 5 >> stream
+0000>
+endstream endobj
+8 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Resources << /ExtGState << /H << /ca 0.5 >> >> >> /Length 62 >> stream
+/H gs 0 1 0 rg 80 40 100 100 re f 0 0 1 rg 130 80 100 100 re f
+endstream endobj
+9 0 obj << /Type /XObject /Subtype /Image /Width 1 /Height 1 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /ASCIIHexDecode /Length 7 >> stream
+0000FF>
+endstream endobj
+10 0 obj << /Type /XObject /Subtype /Image /Width 2 /Height 1 /ColorSpace /DeviceRGB /BitsPerComponent 8 /SMask 11 0 R /Filter /ASCIIHexDecode /Length 13 >> stream
+0000FF0000FF>
+endstream endobj
+11 0 obj << /Type /XObject /Subtype /Image /Width 2 /Height 1 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /ASCIIHexDecode /Length 5 >> stream
+00FF>
+endstream endobj
+12 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Resources << /ExtGState << /H << /ca 0.5 >> >> /XObject << /Img 9 0 R >> >> /Length 38 >> stream
+/H gs q 160 0 0 100 60 50 cm /Img Do Q
+endstream endobj
+13 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Resources << /ExtGState << /H << /ca 0.5 >> >> /XObject << /In3 14 0 R >> >> /Length 13 >> stream
+/H gs /In3 Do
+endstream endobj
+14 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Length 28 >> stream
+0 0 1 rg 100 50 150 120 re f
+endstream endobj
+15 0 obj << /PatternType 2 /Shading << /ShadingType 2 /ColorSpace /DeviceRGB /Coords [0 0 1 0] /Function << /FunctionType 2 /Domain [0 1] /C0 [0 0 1] /C1 [0 0 1] /N 1 >> /Extend [true true] /BBox [100 50 140 170] >> >> endobj
+16 0 obj << /Type /XObject /Subtype /Form /BBox [0 0 300 200] /Group << /S /Transparency >> /Resources << /Pattern << /P 15 0 R >> >> /Length 38 >> stream
+/Pattern cs /P scn 100 50 150 120 re f
+endstream endobj
+17 0 obj << /Type /XObject /Subtype /Image /Width 20000 /Height 20000 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /ASCIIHexDecode /Length 7 >> stream
+0000FF>
+endstream endobj
+trailer << /Root 1 0 R >>
+%%EOF",
+ form.len()
+ );
+ let p = PageRenderer::new(Arc::new(pdf.into_bytes()), RenderConfig::default()).render(RenderRequest {
+ page: 0,
+ kind: RequestKind::Pixels,
+ tile: None,
+ scale: 1.0,
+ tag: 0,
+ preview,
+ });
+ assert!(p.error.is_none(), "{group} {form}: {:?}", p.error);
+ p
+ };
+ let render = |group: &str, form: &str| render_as(group, form, false);
+ // Pixel rows run top down: PDF (x, y) is pixel (x, 200 - y).
+ let px = |p: &RenderedPage, x: u32, y: u32| p.rgba[((200 - y) * p.width + x) as usize * 4..][..3].to_vec();
+ let check = |p: &RenderedPage, x: u32, y: u32, want: [u8; 3], what: &str| {
+ let got = px(p, x, y);
+ assert!(got.iter().zip(want).all(|(a, b)| a.abs_diff(b) <= 2), "{what}: {got:?}, expected {want:?}");
+ };
+ let red = "/A gs 1 0 0 rg 20 20 150 150 re f ";
+ let ko = "/I true /K true";
+
+ let squares = render(ko, &format!("{red}0 0 1 rg 100 50 150 120 re f"));
+ check(&squares, 130, 100, [128, 128, 255], "knocked out");
+ check(&squares, 50, 40, [255, 128, 128], "red alone");
+ check(&squares, 210, 100, [128, 128, 255], "blue alone");
+ check(&squares, 280, 190, [255, 255, 255], "paper");
+ // Page content after the group composites normally again: green at 50 % over the red.
+ check(&squares, 30, 30, [128, 191, 64], "after the group");
+ let plain = render("/I true", &format!("{red}0 0 1 rg 100 50 150 120 re f"));
+ check(&plain, 130, 100, [128, 64, 191], "blended without /K");
+
+ // An image at 50 % replaces the red under its rectangle.
+ let image = render(ko, &format!("{red}q 160 0 0 100 60 50 cm /Img Do Q"));
+ check(&image, 100, 100, [128, 128, 255], "image knocks out");
+ check(&image, 40, 40, [255, 128, 128], "red beside the image");
+ // A soft-masked image: its transparent left half leaves the red, its opaque half replaces it.
+ let masked = render(ko, "1 0 0 rg 20 20 150 150 re f q 160 0 0 100 60 50 cm /Sm Do Q");
+ check(&masked, 100, 100, [255, 0, 0], "under the transparent half");
+ check(&masked, 155, 100, [0, 0, 255], "under the opaque half");
+
+ // A nested group entered at 50 % (blue at 25 % in all) replaces the red under its shape.
+ let nested = render(ko, &format!("{red}/In Do"));
+ check(&nested, 130, 100, [191, 191, 255], "nested group knocks out");
+ check(&nested, 50, 40, [255, 128, 128], "red beside the nested group");
+ // A nested group at full opacity: it knocks out the red as a whole, and its own two
+ // squares at 50 % still blend with each other where they overlap.
+ let neutral = render(ko, "1 0 0 rg 20 20 150 150 re f /Neu Do");
+ check(&neutral, 100, 60, [128, 255, 128], "green over the knocked-out red");
+ check(&neutral, 150, 110, [64, 128, 191], "the nested squares blend");
+ check(&neutral, 40, 40, [255, 0, 0], "red beside the nested group");
+
+ // An image inside a nested group is drawn once (blue at 50 %), over the knocked-out red.
+ let nested_image = render(ko, "1 0 0 rg 20 20 150 150 re f /Nimg Do");
+ check(&nested_image, 100, 100, [128, 128, 255], "image in a nested group");
+ // A group inside a nested group knocks out the red as well.
+ let deep = render(ko, "1 0 0 rg 20 20 150 150 re f /Deep Do");
+ check(&deep, 130, 100, [128, 128, 255], "group in a nested group");
+ check(&deep, 40, 40, [255, 0, 0], "red beside it");
+
+ // A stencil mask must not erase the red beside it.
+ let stencil = render(ko, &format!("{red}0 0 1 rg q 150 0 0 120 100 50 cm /Msk Do Q"));
+ check(&stencil, 50, 40, [255, 128, 128], "red beside a stencil");
+ // Where the stencil paints (every sample 0), its blue is drawn (review on #2974: the check
+ // above alone passed even if the stencil drew nothing). A stencil composites as it did
+ // before rather than knocking the red out, and its exact colour also depends on #2975 (a
+ // stencil's fill opacity applied twice), so only "blue was drawn here" is pinned.
+ let under = px(&stencil, 130, 100);
+ assert!(under != [255, 128, 128] && under[2] >= 150 && under[0] < 230, "stencil drew nothing: {under:?}");
+
+ // A shading's /BBox clips it (ISO 32000-2 Table 77), so a shading fill's shape is its path
+ // inside the box: the erase pass must clear only that, or the red outside the box but
+ // inside the path stays erased (review on #2974).
+ let shaded = render(ko, &format!("{red}/Shg Do"));
+ check(&shaded, 120, 100, [128, 128, 255], "the shading inside its box");
+ check(&shaded, 155, 100, [255, 128, 128], "red outside the shading's box");
+
+ // An image that isn't decoded (here over the renderer's pixel limit) draws nothing, so it
+ // must not clear what is under its rectangle either (review on #2974).
+ let undecoded = render(ko, &format!("{red}q 160 0 0 100 60 50 cm /Big Do Q"));
+ check(&undecoded, 100, 100, [255, 128, 128], "red under an image that isn't drawn");
+ // Nor one a preview skips for covering only a few device pixels (review on #2974): the
+ // red under a 3 x 3 image stays in a preview, and a final render knocks it out.
+ let tiny = format!("{red}q 3 0 0 3 100 100 cm /Img Do Q");
+ check(&render_as(ko, &tiny, true), 101, 101, [255, 128, 128], "red under a preview's skipped image");
+ check(&render_as(ko, &tiny, false), 101, 101, [128, 128, 255], "the tiny image in a final render");
+ }
+
+ /// #2970: a page's objects composite with a transparent backdrop and the page group is then
+ /// put on the paper, so a separable blend mode only blends where something was drawn. A
+ /// green fill with `/BM /Screen` (or Lighten, Difference…) half over a red square is yellow
+ /// (or whatever the mode gives) over the red, and plain green over the empty page: blending
+ /// with the white paper made it white or magenta.
+ #[test]
+ fn blend_modes_over_an_empty_part_of_the_page_keep_their_colour() {
+ let px = |p: &RenderedPage, x: u32, y: u32| p.rgba[((y * p.width + x) * 4) as usize..][..4].to_vec();
+ for (mode, over_red) in [
+ ("Normal", Some([0, 255, 0])),
+ ("Multiply", Some([0, 0, 0])),
+ ("Screen", Some([255, 255, 0])),
+ ("Lighten", Some([255, 255, 0])),
+ ("Difference", Some([255, 255, 0])),
+ ("Exclusion", Some([255, 255, 0])),
+ ("ColorDodge", Some([255, 0, 0])),
+ ("Overlay", Some([255, 0, 0])),
+ // The non-separable modes mix hue, saturation and luminosity; over an empty part of
+ // the page they too must keep the source colour.
+ ("Hue", None),
+ ("Saturation", None),
+ ("Color", None),
+ ("Luminosity", None),
+ ] {
+ let content = "1 0 0 rg 20 20 150 150 re f /G1 gs 0 1 0 rg 100 50 150 120 re f";
+ let pdf = format!(
+ "%PDF-1.7
+1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj
+2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj
+3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 300 200] /Contents 4 0 R /Resources << /ExtGState << /G1 5 0 R >> >> >> endobj
+4 0 obj << /Length {} >> stream
+{content}
+endstream endobj
+5 0 obj << /Type /ExtGState /BM /{mode} >> endobj
+trailer << /Root 1 0 R >>
+%%EOF",
+ content.len()
+ );
+ let p = PageRenderer::new(Arc::new(pdf.into_bytes()), RenderConfig::default()).render(RenderRequest {
+ page: 0,
+ kind: RequestKind::Pixels,
+ tile: None,
+ scale: 1.0,
+ tag: 0,
+ ..Default::default()
+ });
+ assert!(p.error.is_none(), "{mode}: {:?}", p.error);
+ // Pixel rows run top down: PDF (210, 100) and (130, 100) are rows 100 from the top.
+ assert_eq!(px(&p, 210, 100), vec![0, 255, 0, 255], "{mode} over the empty page");
+ if let Some(over_red) = over_red {
+ assert_eq!(px(&p, 130, 100)[..3], over_red, "{mode} over the red square");
+ }
+ assert_eq!(px(&p, 280, 10), vec![255, 255, 255, 255], "{mode}: the paper stays white");
+ }
+ }
+
+ /// A transparent page leaves what nothing paints see-through, so it can be laid over another
+ /// raster: with reading colours on, and in a tile, too. Painted pixels stay premultiplied.
+ #[test]
+ fn transparent_pages_paint_only_their_content() {
+ let content = "0 0 1 rg 10 10 30 20 re f /GS gs 0.5 g 60 10 30 20 re f";
+ let pdf = format!(
+ "%PDF-1.4\n\
+ 1 0 obj << /Type /Catalog /Pages 2 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 100 50] /Contents 4 0 R /Resources << /ExtGState << /GS << /ca 0.5 >> >> >> >> endobj\n\
+ 4 0 obj << /Length {} >> stream\n{content}\nendstream endobj\n\
+ trailer << /Root 1 0 R >>\n%%EOF",
+ content.len()
+ )
+ .into_bytes();
+ let pixel = |page: &RenderedPage, x: u32, y: u32| page.rgba[((y * page.width + x) * 4) as usize..][..4].to_vec();
+ for reading_colors in [ReadingColors::default(), ReadingColors::WHITE_ON_BLACK] {
+ let config = RenderConfig { transparent: true, reading_colors, ..Default::default() };
+ let mut r = PageRenderer::new(Arc::new(pdf.clone()), config.clone());
+ let page = r.render(RenderRequest { page: 0, scale: 2.0, ..Default::default() });
+ assert!(page.error.is_none(), "{:?}", page.error);
+ assert_eq!(pixel(&page, 5, 5), [0, 0, 0, 0], "{reading_colors:?}: nothing painted, nothing shown");
+ assert_eq!(pixel(&page, 50, 60)[3], 255, "{reading_colors:?}: the opaque rectangle covers");
+ assert_eq!(pixel(&page, 150, 60), [64, 64, 64, 128], "{reading_colors:?}: half-transparent grey, premultiplied");
+ let tile = r.render(RenderRequest { page: 0, scale: 2.0, tile: Some(Tile { x: 0, y: 40, w: 100, h: 60 }), ..Default::default() });
+ assert_eq!((pixel(&tile, 5, 5), pixel(&tile, 50, 20)), (pixel(&page, 5, 45), pixel(&page, 50, 60)), "{reading_colors:?}");
+ let pool = RenderPool::new(Arc::new(pdf.clone()), 1, config);
+ pool.set_queue(vec![RenderRequest { page: 0, scale: 2.0, ..Default::default() }]);
+ let pooled = loop {
+ if let Some(p) = pool.try_recv() {
+ break p;
+ }
+ std::thread::sleep(std::time::Duration::from_millis(5));
+ };
+ assert_eq!(pooled.rgba, page.rgba, "{reading_colors:?}: the pool renders the same");
+ }
+ let opaque = PageRenderer::new(Arc::new(pdf), RenderConfig::default()).render(RenderRequest { page: 0, scale: 2.0, ..Default::default() });
+ assert_eq!(pixel(&opaque, 5, 5), [255, 255, 255, 255], "pages are still white by default");
+ }
+
/// Reading colours replace *document* colours, never annotation colours (issue #1548): a
/// highlight keeps its `/C`, so on a dark background the content under it shows through the
/// Multiply blend in the highlight's colour instead of being darkened into invisibility.
diff --cc crates/ui-egui/src/i18n/ar.tsv
index f4346abdc,3ba63e9b9..b5c9162b3
--- a/crates/ui-egui/src/i18n/ar.tsv
+++ b/crates/ui-egui/src/i18n/ar.tsv
@@@ -2760,6 -2757,5 +2760,8 @@@ certificate Version الإصدا�
Paragraph spacing تباعد الفقرات
Less أقل
Other options خيارات أخرى
+ Thumbnail size حجم الصور المصغرة
+ Smaller thumbnails تصغير الصور المصغرة
+ Larger thumbnails تكبير الصور المصغرة
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment إعادة تشكيل التعليق
diff --cc crates/ui-egui/src/i18n/bg.tsv
index 1b17ad275,5ffb53a3c..e610ee6cf
--- a/crates/ui-egui/src/i18n/bg.tsv
+++ b/crates/ui-egui/src/i18n/bg.tsv
@@@ -2447,6 -2444,5 +2447,8 @@@ animation effects Off Изключен�
Paragraph spacing Разстояние между абзаците
Less По-малко
Other options Други опции
+ Thumbnail size Размер на миниатюрите
+ Smaller thumbnails По-малки миниатюри
+ Larger thumbnails По-големи миниатюри
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Промяна на формата на коментара
diff --cc crates/ui-egui/src/i18n/cs.tsv
index c7bc39694,b97ea9d44..47b0c4d93
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@@ -2558,6 -2555,5 +2558,8 @@@ animation effects Off Vypnut
Paragraph spacing Mezera mezi odstavci
Less Méně
Other options Další možnosti
+ Thumbnail size Velikost miniatur
+ Smaller thumbnails Menší miniatury
+ Larger thumbnails Větší miniatury
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Změnit tvar komentáře
diff --cc crates/ui-egui/src/i18n/de.tsv
index d3d884ca9,4569808ff..a6bc3fc17
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@@ -2485,6 -2482,5 +2485,8 @@@ animation effects Off Au
Paragraph spacing Absatzabstand
Less Weniger
Other options Weitere Optionen
+ Thumbnail size Miniaturgröße
+ Smaller thumbnails Kleinere Miniaturen
+ Larger thumbnails Größere Miniaturen
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Kommentar umformen
diff --cc crates/ui-egui/src/i18n/el.tsv
index e87da7f99,4bd39b370..89f5b1af7
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@@ -2490,6 -2487,5 +2490,8 @@@ animation effects Off Ανενεργ�
Paragraph spacing Απόσταση παραγράφων
Less Λιγότερα
Other options Άλλες επιλογές
+ Thumbnail size Μέγεθος μικρογραφιών
+ Smaller thumbnails Μικρότερες μικρογραφίες
+ Larger thumbnails Μεγαλύτερες μικρογραφίες
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Αλλαγή σχήματος σχολίου
diff --cc crates/ui-egui/src/i18n/es.tsv
index d2ab8a586,868a6ab57..0d7f09ac4
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@@ -2624,6 -2621,5 +2624,8 @@@ animation effects Off Desactivado
# Historical snapshot notice bar (View signed version / View revision).
You are viewing the signed version of “{from}” (revision {rev}). It is a snapshot: changes here won't affect the original. Estás viendo la versión firmada de «{from}» (revisión {rev}). Es una instantánea: los cambios aquí no afectarán al original.
You are viewing revision {rev} of “{from}”. It is a snapshot: changes here won't affect the original. Estás viendo la revisión {rev} de «{from}». Es una instantánea: los cambios aquí no afectarán al original.
+ Thumbnail size Tamaño de las miniaturas
+ Smaller thumbnails Miniaturas más pequeñas
+ Larger thumbnails Miniaturas más grandes
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Cambiar la forma del comentario
diff --cc crates/ui-egui/src/i18n/fr.tsv
index 7f9d71d42,5d3cbb120..8353b2a95
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@@ -2484,6 -2481,5 +2484,8 @@@ animation effects Off Désactivé
Paragraph spacing Espacement des paragraphes
Less Moins
Other options Autres options
+ Thumbnail size Taille des vignettes
+ Smaller thumbnails Réduire les vignettes
+ Larger thumbnails Agrandir les vignettes
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Modifier la forme du commentaire
diff --cc crates/ui-egui/src/i18n/hu.tsv
index 99eb996bb,e18b4cefc..20d012a05
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@@ -2483,6 -2480,5 +2483,8 @@@ animation effects Off K
Paragraph spacing Bekezdéstávolság
Less Kevesebb
Other options Egyéb beállítások
+ Thumbnail size Bélyegképek mérete
+ Smaller thumbnails Kisebb bélyegképek
+ Larger thumbnails Nagyobb bélyegképek
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Megjegyzés alakjának módosítása
diff --cc crates/ui-egui/src/i18n/it.tsv
index 1bf5abb26,9be91dbcd..2afa2bf68
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@@ -2696,6 -2693,5 +2696,8 @@@ certificate SHA-256 digest Impronta SHA
Paragraph spacing Spaziatura paragrafi
Less Meno
Other options Altre opzioni
+ Thumbnail size Dimensione miniature
+ Smaller thumbnails Miniature più piccole
+ Larger thumbnails Miniature più grandi
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Modifica la forma del commento
diff --cc crates/ui-egui/src/i18n/ja.tsv
index 67e92ebbb,42c96799d..a9a372bb8
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@@ -2484,6 -2481,5 +2484,8 @@@ animation effects Off オ�
Paragraph spacing 段落間隔
Less 折りたたむ
Other options その他のオプション
+ Thumbnail size サムネイルのサイズ
+ Smaller thumbnails サムネイルを小さく
+ Larger thumbnails サムネイルを大きく
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment コメントの形状を変更
diff --cc crates/ui-egui/src/i18n/kk.tsv
index 5153d5882,902366b5b..c6e410057
--- a/crates/ui-egui/src/i18n/kk.tsv
+++ b/crates/ui-egui/src/i18n/kk.tsv
@@@ -2482,6 -2479,5 +2482,8 @@@ animation effects Off Өшірул�
Paragraph spacing Абзац аралығы
Less Азырақ
Other options Басқа параметрлер
+ Thumbnail size Нобай өлшемі
+ Smaller thumbnails Кішірек нобайлар
+ Larger thumbnails Үлкенірек нобайлар
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Пікір пішінін өзгерту
diff --cc crates/ui-egui/src/i18n/lt.tsv
index bb0f8803d,7007f2af9..3f258239a
--- a/crates/ui-egui/src/i18n/lt.tsv
+++ b/crates/ui-egui/src/i18n/lt.tsv
@@@ -2734,6 -2731,5 +2734,8 @@@ theme Appearance Išvaizd
Paragraph spacing Tarpas tarp pastraipų
Less Mažiau
Other options Kitos parinktys
+ Thumbnail size Miniatiūrų dydis
+ Smaller thumbnails Mažesnės miniatiūros
+ Larger thumbnails Didesnės miniatiūros
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Keisti komentaro formą
diff --cc crates/ui-egui/src/i18n/pl.tsv
index e2239615d,3f2a3a604..c89ef51c3
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@@ -2460,6 -2457,5 +2460,8 @@@ animation effects Off Wyłączon
Paragraph spacing Odstęp między akapitami
Less Mniej
Other options Inne opcje
+ Thumbnail size Rozmiar miniatur
+ Smaller thumbnails Mniejsze miniatury
+ Larger thumbnails Większe miniatury
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Zmień kształt komentarza
diff --cc crates/ui-egui/src/i18n/pt-br.tsv
index 6ead2e722,73fb01255..db779cde8
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@@ -2498,6 -2495,5 +2498,8 @@@ animation effects Off Desativado
Paragraph spacing Espaçamento entre parágrafos
Less Menos
Other options Outras opções
+ Thumbnail size Tamanho das miniaturas
+ Smaller thumbnails Miniaturas menores
+ Larger thumbnails Miniaturas maiores
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Alterar a forma do comentário
diff --cc crates/ui-egui/src/i18n/ru.tsv
index 4d5a12325,7e50b2a90..8824f14ca
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@@ -2397,6 -2394,5 +2397,8 @@@ animation effects Off Вык�
Paragraph spacing Интервал между абзацами
Less Меньше
Other options Другие параметры
+ Thumbnail size Размер миниатюр
+ Smaller thumbnails Уменьшить миниатюры
+ Larger thumbnails Увеличить миниатюры
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Изменить форму комментария
diff --cc crates/ui-egui/src/i18n/sl.tsv
index d8c8512af,3bf1ab551..833e7f4dc
--- a/crates/ui-egui/src/i18n/sl.tsv
+++ b/crates/ui-egui/src/i18n/sl.tsv
@@@ -2489,6 -2486,5 +2489,8 @@@ animation effects Off Izklopljen
Paragraph spacing Razmik med odstavki
Less Manj
Other options Druge možnosti
+ Thumbnail size Velikost sličic
+ Smaller thumbnails Manjše sličice
+ Larger thumbnails Večje sličice
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Spremeni obliko komentarja
diff --cc crates/ui-egui/src/i18n/te.tsv
index d82bc504b,da5bc68f2..b1614defb
--- a/crates/ui-egui/src/i18n/te.tsv
+++ b/crates/ui-egui/src/i18n/te.tsv
@@@ -2393,6 -2390,5 +2393,8 @@@ animation effects Off ఆఫ�
Paragraph spacing పేరా అంతరం
Less తక్కువ
Other options ఇతర ఎంపికలు
+ Thumbnail size థంబ్‌నెయిల్ పరిమాణం
+ Smaller thumbnails చిన్న థంబ్‌నెయిల్‌లు
+ Larger thumbnails పెద్ద థంబ్‌నెయిల్‌లు
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment వ్యాఖ్య ఆకారాన్ని మార్చు
diff --cc crates/ui-egui/src/i18n/tr.tsv
index 4fc064b7f,e17792fcd..2e14e367e
--- a/crates/ui-egui/src/i18n/tr.tsv
+++ b/crates/ui-egui/src/i18n/tr.tsv
@@@ -2480,6 -2477,5 +2480,8 @@@ animation effects Off Kapal�
Paragraph spacing Paragraf aralığı
Less Daha az
Other options Diğer seçenekler
+ Thumbnail size Küçük resim boyutu
+ Smaller thumbnails Küçük resimleri küçült
+ Larger thumbnails Küçük resimleri büyüt
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Yorumun şeklini değiştir
diff --cc crates/ui-egui/src/i18n/uk.tsv
index 3231a39b9,cf634d734..24e784f13
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@@ -2506,6 -2503,5 +2506,8 @@@ animation effects Off Вимкнен�
Paragraph spacing Інтервал між абзацами
Less Менше
Other options Інші параметри
+ Thumbnail size Розмір мініатюр
+ Smaller thumbnails Зменшити мініатюри
+ Larger thumbnails Збільшити мініатюри
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Змінити форму коментаря
diff --cc crates/ui-egui/src/i18n/vi.tsv
index 0e43b1b7c,4ee53e9b8..7c9648965
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@@ -2736,6 -2733,5 +2736,8 @@@ key Space Spac
# Historical snapshot notice bar (View signed version / View revision).
You are viewing the signed version of “{from}” (revision {rev}). It is a snapshot: changes here won't affect the original. Bạn đang xem phiên bản đã ký của “{from}” (bản sửa đổi {rev}). Đây là ảnh nhanh: các thay đổi ở đây không được áp dụng đến bản gốc.
You are viewing revision {rev} of “{from}”. It is a snapshot: changes here won't affect the original. Bạn đang xem bản sửa đổi {rev} của “{from}”. Đây là ảnh nhanh: các thay đổi ở đây không được áp dụng đến bản gốc.
+ Thumbnail size Kích thước hình thu nhỏ
+ Smaller thumbnails Giảm kích thước hình thu nhỏ
+ Larger thumbnails Tăng kích thước hình thu nhỏ
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment Đổi hình dạng nhận xét
diff --cc crates/ui-egui/src/i18n/zh-hans.tsv
index a37d2e7d9,f99808c35..b95778edd
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@@ -2448,6 -2445,5 +2448,8 @@@ animation effects Off �
Paragraph spacing 段落间距
Less 收起
Other options 其他选项
+ Thumbnail size 缩略图大小
+ Smaller thumbnails 缩小缩略图
+ Larger thumbnails 放大缩略图
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment 更改注释形状
diff --cc crates/ui-egui/src/i18n/zh-hant.tsv
index 3f2629b81,9382739d1..651c06982
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@@ -2434,6 -2431,5 +2434,8 @@@ animation effects Off �
Paragraph spacing 段落間距
Less 收起
Other options 其他選項
+ Thumbnail size 縮圖大小
+ Smaller thumbnails 縮小縮圖
+ Larger thumbnails 放大縮圖
+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).
+ Reshape comment 變更註解形狀
diff --cc docs/roadmap.md
index 856aa6bd2,11c92310f..5db284cf4
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@@ -1,12 -1,8 +1,13 @@@
# 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-20 · **Last updated:** 2026-10-20 · **Change:** minor (M3, #3541/#3620: comment hover follows individual marked lines and original annotation paint order; 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)
@@@ -119,10 -116,10 +122,11 @@@ total matches the parity estimate
|---|---|---|---|---|---|
| M0 | Skeleton: workspace, xtask gates, CI | 15–30 | 98% | 1–2 | GitHub workflow, `deny.toml` (licence audit of every dependency), parity checklist (826 features, `xtask parity`) done. Missing: remaining crate stubs, testkit/oracle crates |
| M1 | COS: filters, crypt, parser, xref, writer | 120–200 | 80% | 20–40 | Done:<br>- filters and crypt: every standard-security revision R2–R6 (RC4, AES-128/256), SASLprep, permissions, creating encryption;<br>- cos: parse and repair (including invalid xref object-number ranges), decoded-stream limits including unfiltered data, decrypt on load, re-encrypt on save, incremental and full writing.<br>Corpus: open/edit/save passes on 958 files, and all 7 password-protected files open.<br>Full saves now pack objects into compressed object streams. An unchanged incremental save of a classic table writes a zero-length cross-reference subsection instead of a section with no subsections (#1339). A full rewrite keeps unknown trailer entries, including objects reachable only from them (#1338). Fuzzing runs nightly (`xtask fuzz`). Raw-deflate fallback preserves decoding-limit errors, including through tolerant COS stream decoding. Missing: ≥ 250 tests, own image codecs |
-| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Short same-line redraws split before placement rather than interleaving. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings. Packed TIFF-predictor RGB rows retain later rows in decoding and rendering. Page marks, added content and print output retain small page-unit transform coefficients when serialized. |
+| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Short same-line redraws split before placement rather than interleaving. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings. Packed TIFF-predictor RGB rows retain later rows in decoding and rendering. Page marks, added content and print output retain small page-unit transform coefficients when serialized. Forms without Resources use page Properties for ActualText and layer visibility; own dictionaries stop fallback. Oversized missing inline-image samples, including header and terminator overhead, no longer pin the content window (#3107 / PR #3438); normal large streamed images retain deterministic sample boundaries. Radial luminosity fades have synthetic coverage for the existing #2132 mask guard, including per-pixel references, antialiased clips, previews, scales and tiles; no additional production fix was needed. |
| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Short same-line redraws split before placement rather than interleaving. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings. Packed TIFF-predictor RGB rows retain later rows in decoding and rendering. The renderer keeps its one-point crop-size floor in physical points after UserUnit scaling, with regression coverage for crop origins, rotations and f32 reciprocal rounding. Existing unit policy and nearly-zero fallback are retained. |
| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Short same-line redraws split before placement rather than interleaving. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings |
+| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). #3808: the Pages inspector offers a 50–150% thumbnail slider and buttons, also available through `ui.set`. Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). Selected-text Copy in Edit and the canvas context menu is covered by focused regressions and native clipboard checks (#1225); document copy restrictions apply to the floating action too. #1364 candidate: absolute local GoToR links ask before target access; headless callers explicitly opt in. Native-opening candidate: chosen tools survive preparation and password retries; startup intake waits for pending preparation. Page-label navigation displays logical labels, retains the current page on unchanged submission and refreshes focused same-document replacements; clean file-watcher reload preserves the chosen scrolling mode, preventing a Single Page reader from jumping to page 1 during replacement. Synthetic control regressions cover these behaviors. #3149: page-list changes discard render demand based on old geometry; actual raster dimensions are checked against the GPU limit before upload. Synthetic crash and continued-rendering regressions cover the replacement path. Save-prompt shortcuts yield to dialogs above them; stacked link-consent UI regression covers Escape and Return. |
+ | M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). Selected-text Copy in Edit and the canvas context menu is covered by focused regressions and native clipboard checks (#1225); document copy restrictions apply to the floating action too. #1364 candidate: absolute local GoToR links ask before target access; headless callers explicitly opt in. Native-opening candidate: chosen tools survive preparation and password retries; startup intake waits for pending preparation. Page-label navigation displays logical labels, retains the current page on unchanged submission and refreshes focused same-document replacements; clean file-watcher reload preserves the chosen scrolling mode, preventing a Single Page reader from jumping to page 1 during replacement. Synthetic control regressions cover these behaviors. #3149: page-list changes discard render demand based on old geometry; actual raster dimensions are checked against the GPU limit before upload. Synthetic crash and continued-rendering regressions cover the replacement path. Save-prompt shortcuts yield to dialogs above them; stacked link-consent UI regression covers Escape and Return. Comment hover follows individual marked lines and original annotation paint order (#3541/#3620), independently of spatial inspection sorting; synthetic rotation, differing-upper-edge overlap and unchanged-document regressions. |
| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). Selected-text Copy in Edit and the canvas context menu is covered by focused regressions and native clipboard checks (#1225); document copy restrictions apply to the floating action too. #1364 candidate: absolute local GoToR links ask before target access; headless callers explicitly opt in. Native-opening candidate: chosen tools survive preparation and password retries; startup intake waits for pending preparation. Page-label navigation displays logical labels, retains the current page on unchanged submission and refreshes focused same-document replacements; clean file-watcher reload preserves the chosen scrolling mode, preventing a Single Page reader from jumping to page 1 during replacement. Synthetic control regressions cover these behaviors. Wrapped revision buttons stay above Binding in Document Properties (#2739); a synthetic UI test checks layout and saved revision content. |
| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). #1364 candidate: absolute local GoToR links ask before target access; headless callers explicitly opt in. Native-opening candidate: chosen tools survive preparation and password retries; startup intake waits for pending preparation. Later native-open replies stay queued while a modal or picker owns the foreground; regressions cover recipient ownership, completion/cancellation and one-shot wakes. |
| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). #1364 candidate: absolute local GoToR links ask before target access; headless callers explicitly opt in. Native-opening candidate: chosen tools survive preparation and password retries; startup intake waits for pending preparation. #1980: exact quit modifiers preserve Ctrl+Alt+Q email input; Ctrl+Q/Cmd+Q asks before discarding unsaved documents. |
@@@ -213,7 -208,7 +217,8 @@@ M2 (renderer), M7 (content editing), M1
| 2026-10-20 | minor | M6: Prepare a form ▸ Calculation order: formulas and values, what is wrong and Fix order, Up/Down, Alt+↑/↓ and drag, links on the page. Estimates unchanged. |
| 2026-10-20 | minor | M6: `form_calculation_order` reads, checks, fixes and sets the calculation order; an edited formula keeps its place in `/CO`. Estimates unchanged. |
| 2026-10-19 | minor | M6: renaming a field renames it in the calculations that read it; `form_set_props` returns `formulas_updated` and Field Properties says how many changed. Estimates unchanged. |
+| 2026-10-20 | minor | M6, #3502: form detection preserves comments across content streams; estimates unchanged. |
+ | 2026-10-20 | minor | M3/#3620: overlapping comment hover follows original annotation indices independently of spatial inspection sorting; a synthetic differing-upper-edge regression covers paint order. 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: Edit text caret height follows its row, with a kittest regression; estimates unchanged |