PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M7: keep a neighbouring line when replacing text (#1316) (#1427)
Márk Bartalosc6128c039ac9
diff --git a/ROADMAP.md b/ROADMAP.mdindex 78ad856a9..1f774cd56 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -2,6 +2,7 @@**Stage: alpha** · next: beta, ~26% (ready for real work 49% → 75%) and ~400–700 h away+> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M7 #1316: replacing a line keeps a neighbouring line whose glyph box overlaps; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M1 #1339: an unchanged incremental save of a classic cross-reference table writes a zero-length subsection; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M14 Windows low-DPI font-hinting candidate measured on macOS; no Windows runtime claim; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M3: Windows' Animation effects setting is followed, and Preferences has Animation effects: system, on or off); earlier: exclusive image-crop resize follow-up; M2 short same-line redraws split before placement; estimates unchanged · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)@@ -141,6 +142,7 @@ Ranked; detail and the full milestone table in [docs/roadmap.md](docs/roadmap.md## Progress log+- **2026-10-12 (M7, #1316):** Replacing a line or paragraph no longer removes a distinct neighbour whose glyph box overlaps the edited line. A second drawing is removed only when it also sits on the same baseline, so fake-bold and invisible copies still go. Synthetic regressions cover 6 pt leading, the same word on the next line, ordinary spacing, a separate paragraph, same-position copies, and incremental and full save/reopen. Estimates unchanged.- **2026-10-12 (M1, #1339):** An incremental save of an unchanged classic-table file used to append `xref` and then `trailer` with no subsection, which qpdf reports as a damaged file. The section now has a zero-length subsection, so no object entry changes and a trailer-only edit is still written. Estimates unchanged.- **2026-10-12 (M12, auto-tag preview):** The engine and `accessibility_autotag_preview` propose paragraph and large-heading roles for bounded text blocks on one page, with locations and reasons. Every proposal needs review; images remain unclassified. No PDF tags are written yet. Synthetic tool tests cover normal text, a larger heading, bounds and unchanged source bytes. Estimates unchanged.- **2026-10-12 (M10, editing OCR text on scans):** Editing a recognised word on a scanned page now changes what the page shows. Before, the rewrite stayed invisible OCR text, so the scan still showed the old word; on a form, the whole OCR layer also grouped into one paragraph that rewrapped when one word changed. OCR words now group into phrases (a table cell or a tab stop splits them, and lines stay apart); an edit draws the phrase visibly in the scan's sampled ink colour over a cover in the sampled paper colour, keeping each word's width and growing rightwards. The editor covers the scanned word while typing. OCR words are now sized from their letters (a capitals-only word's box spans the cap height, not the full ascender-descender span), so recognised and rewritten text is as tall as the scanned word and sits on its baseline. Five engine tests on synthetic scans and a kittest UI test; `ocr.editable-text-output` is partial.diff --git a/crates/edit/src/tests.rs b/crates/edit/src/tests.rsindex 4bcaef817..f5b37776b 100644--- a/crates/edit/src/tests.rs+++ b/crates/edit/src/tests.rs@@ -1,6 +1,6 @@use std::sync::Arc;-use pdfcraft_cos::{Document, SaveOptions, write_incremental};+use pdfcraft_cos::{Document, SaveOptions, write_full, write_incremental};use super::*;@@ -1824,6 +1824,52 @@ fn a_line_drawn_twice_is_replaced_everywhere() {assert_eq!(lines.iter().map(|l| l.text.as_str()).collect::<Vec<_>>(), ["Hello there", "world"]);}+#[test]+fn replacing_a_line_keeps_a_distinct_nearby_line() {+ // 12 pt lines 6 pt apart: the glyph boxes overlap by more than half the smaller box,+ // but the baselines are different lines (#1316).+ let src = "BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj 0 -6 Td (Beta) Tj ET";+ let listed = |doc: &Document| text::text_lines(doc, 0).unwrap().into_iter().map(|l| l.text).collect::<Vec<_>>();+ for paragraph in [false, true] {+ let mut doc = text_page(src);+ assert_eq!(listed(&doc), ["Alpha", "Beta"]);+ assert_eq!(text::text_blocks(&doc, 0).unwrap().len(), 2);+ if paragraph {+ text::rewrite_block(&mut doc, 0, 0, Some("ALPHA"), &text::BlockStyle::default()).unwrap();+ } else {+ text::replace_line(&mut doc, 0, 0, "ALPHA").unwrap();+ }+ assert_eq!(listed(&doc), ["ALPHA", "Beta"]);+ assert!(String::from_utf8_lossy(&page_content_bytes(&doc, 0)).contains("(Beta)"));+ for bytes in [write_incremental(&doc, &SaveOptions::default()).unwrap(), write_full(&doc, &SaveOptions::default()).unwrap()] {+ let back = Document::open(Arc::new(bytes)).unwrap();+ assert!(back.repair_log().is_empty());+ assert_eq!(listed(&back), ["ALPHA", "Beta"]);+ }+ }+ // The same word on the next line is still a different line.+ let mut same = text_page("BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj 0 -6 Td (Alpha) Tj ET");+ text::replace_line(&mut same, 0, 0, "ALPHA").unwrap();+ assert_eq!(listed(&same), ["ALPHA", "Alpha"]);+ // Ordinary leading, and a paragraph far enough to group apart, keep the neighbour.+ let mut spaced = text_page("BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj 0 -14.4 Td (Beta) Tj ET");+ text::replace_line(&mut spaced, 0, 0, "ALPHA").unwrap();+ assert_eq!(listed(&spaced), ["ALPHA", "Beta"]);+ let mut apart = text_page("BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj 0 -40 Td (Beta) Tj ET");+ text::rewrite_block(&mut apart, 0, 0, Some("ALPHA"), &text::BlockStyle::default()).unwrap();+ assert_eq!(listed(&apart), ["ALPHA", "Beta"]);+ // A second copy at the same position is still one replacement.+ for paragraph in [false, true] {+ let mut duplicate = text_page("BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj ET BT /F1 12 Tf 1 0 0 1 72 700 Tm (Alpha) Tj ET");+ if paragraph {+ text::rewrite_block(&mut duplicate, 0, 0, Some("ALPHA"), &text::BlockStyle::default()).unwrap();+ } else {+ text::replace_line(&mut duplicate, 0, 0, "ALPHA").unwrap();+ }+ assert_eq!(listed(&duplicate), ["ALPHA"]);+ }+}+#[test]fn paragraphs_move_and_rewrap_to_a_new_width() {let para = "BT /F1 10 Tf 12 TL 100 700 Td (One two three four five six seven) Tj T* (eight nine ten eleven twelve) Tj ET";diff --git a/crates/edit/src/text.rs b/crates/edit/src/text.rsindex cb8b93edf..981f3c0d0 100644--- a/crates/edit/src/text.rs+++ b/crates/edit/src/text.rs@@ -1471,8 +1471,8 @@ pub(crate) fn replace_line_with_limit(doc: &mut Document, page: usize, line: usi}}// Rebuild: the line's first operator becomes the replacement, its others go. Copies of the- // line drawn in the same area go too, so the replacement is all that shows.- let drops = coincident_ops(&lines, std::slice::from_ref(&target.rect));+ // line drawn on the same baseline go too, so the replacement is all that shows.+ let drops = coincident_ops(&lines, &[&target]);let new_data = splice(&pieces, &ops, |i| if i == first { (std::mem::take(&mut replacement), false) } else { (Vec::new(), !drops.contains(&i)) });let contents = rewritten_contents(doc, &streams, new_data);let page_ref = p.obj;@@ -1493,27 +1493,44 @@ fn font_size_before(ops: &[Op], at: usize) -> Option<f64> {ops[..at].iter().rev().find(|o| o.is("Tf")).and_then(|o| o.num(1))}-/// The operators of every line drawn in the same area as one of `rects`. Documents sometimes-/// draw a line more than once (fake bold, an invisible text layer), and a surviving copy would-/// show the old text under the replaced line. Copies overlap a member's rect by more than half of-/// the smaller rect; neighbouring lines share no area.-fn coincident_ops(lines: &[TextLine], rects: &[[f64; 4]]) -> std::collections::HashSet<usize> {+/// Operators of every line that is another drawing of one of `targets` (fake bold, an invisible+/// text layer). A surviving copy would show the old text under the replacement.+///+/// A copy overlaps a target by more than half the smaller box and sits on the same baseline+/// (within the tolerance that joins showing operators onto one line). A neighbouring line can+/// share box area when the leading is tighter than the font's ascent plus descent; its baseline+/// is farther away, so it stays.+fn coincident_ops(lines: &[TextLine], targets: &[&TextLine]) -> std::collections::HashSet<usize> {let area = |r: [f64; 4]| ((r[2] - r[0]) * (r[3] - r[1])).max(0.0);let mut drop = std::collections::HashSet::new();- for l in lines {- let covered = rects.iter().any(|m| {- let ix = (m[2].min(l.rect[2]) - m[0].max(l.rect[0])).max(0.0);- let iy = (m[3].min(l.rect[3]) - m[1].max(l.rect[1])).max(0.0);- let small = area(*m).min(area(l.rect));- small > 0.0 && ix * iy / small > 0.5- });- if covered {- drop.extend(l.ops.iter().copied());+ for line in lines {+ let copy = targets.iter().any(|target| overlaps_half(line.rect, target.rect, area) && on_same_baseline(line, target));+ if copy {+ drop.extend(line.ops.iter().copied());}}drop}+fn overlaps_half(a: [f64; 4], b: [f64; 4], area: impl Fn([f64; 4]) -> f64) -> bool {+ let ix = (b[2].min(a[2]) - b[0].max(a[0])).max(0.0);+ let iy = (b[3].min(a[3]) - b[1].max(a[1])).max(0.0);+ let small = area(b).min(area(a));+ small > 0.0 && ix * iy / small > 0.5+}++/// Perpendicular distance between baselines, in user space. Horizontal text compares height;+/// turned text compares the distance across the writing direction.+fn on_same_baseline(line: &TextLine, target: &TextLine) -> bool {+ let angle = target.rotation().to_radians();+ let (sin, cos) = if angle.is_finite() { angle.sin_cos() } else { (0.0, 1.0) };+ let dx = line.origin.x - target.origin.x;+ let dy = line.origin.baseline - target.origin.baseline;+ let offset = dx.mul_add(-sin, dy * cos).abs();+ let size = line.size.min(target.size).max(1.0);+ offset.is_finite() && offset < size * 0.3+}+/// The paragraphs on a page (0-based).pub fn text_blocks(doc: &Document, page: usize) -> Result<Vec<TextBlock>, EditError> {let lines = text_lines(doc, page)?;@@ -1527,8 +1544,8 @@ pub fn clear_block(doc: &mut Document, page: usize, block: usize) -> Result<(),let lines = text_lines(doc, page)?;let blocks = group_blocks(&lines);let target = blocks.get(block).ok_or_else(|| EditError::Invalid("the paragraph no longer exists".into()))?;- let rects: Vec<_> = target.lines.iter().filter_map(|i| lines.get(*i)).map(|l| l.rect).collect();- let mut drops = coincident_ops(&lines, &rects);+ let targets: Vec<&TextLine> = target.lines.iter().filter_map(|i| lines.get(*i)).collect();+ let mut drops = coincident_ops(&lines, &targets);drops.extend(target.lines.iter().filter_map(|i| lines.get(*i)).flat_map(|l| l.ops.iter().copied()));let p = page_dict(doc, page)?;let res = p.dict.get(b"Resources").and_then(|r| doc.resolve(r).as_dict().cloned()).unwrap_or_default();@@ -1917,10 +1934,9 @@ pub(crate) fn rewrite_block_with_limit(block_ops.push(Op::new("Q", vec![]));}block_ops.push(Op::new("Q", vec![]));- // The paragraph's operators go, and so does anything drawn in the same area (a fake-bold+ // The paragraph's operators go, and so does another drawing on the same baseline (a fake-bold// second copy, an invisible text layer): the new text is all that may show.- let member_rects: Vec<[f64; 4]> = members.iter().map(|l| l.rect).collect();- let mut drop = coincident_ops(&lines, &member_rects);+ let mut drop = coincident_ops(&lines, &members);drop.extend(members.iter().flat_map(|l| l.ops.iter().copied()));// Text shown earlier in the same text object stays first: the paragraph then goes where it// was, between two halves of the text object, so it keeps its place in reading order.diff --git a/crates/edit/src/text_regions.rs b/crates/edit/src/text_regions.rsindex 58749afe9..0213d9040 100644--- a/crates/edit/src/text_regions.rs+++ b/crates/edit/src/text_regions.rs@@ -696,8 +696,7 @@ pub(super) fn rewrite_styled_block(let pieces = Pieces::join(&streams.iter().map(|(_, d)| d.as_slice()).collect::<Vec<_>>());let ops = pieces.parse().ops;let members: Vec<_> = block.lines.iter().filter_map(|i| lines.get(*i)).collect();- let rects: Vec<_> = members.iter().map(|l| l.rect).collect();- let mut drop = coincident_ops(lines, &rects);+ let mut drop = coincident_ops(lines, &members);drop.extend(members.iter().flat_map(|l| l.ops.iter().copied()));let o = &first.origin;let start = first.ops.first().copied().unwrap_or(o.bt_op);diff --git a/docs/gaps.md b/docs/gaps.mdindex be1000b6a..0e8b583de 100644--- a/docs/gaps.md+++ b/docs/gaps.md@@ -1,5 +1,6 @@# Where PdfCraft falls short of Acrobat Pro+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-12 · **Change:** minor (#1316: replacing a line keeps a neighbouring line whose glyph box overlaps; gap 3 remains) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-12 · **Change:** gap 4 closed: the web build prints through the browser's print dialog; exclusive image-crop resize follow-up; minor (Word invoice regression coverage, #773; Office fidelity still partial; gap 2: hayro patch counts after the native-gradient backport) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-12 · **Change:** minor (gap 13: large-file memory measured, edits keep two copies instead of three, file-backed input blocked on gap 2) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (gap 1 closed by #836; fixed issues removed from gaps 3, 6 and 16) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)@@ -87,7 +88,9 @@ update the numbers.and single-face OpenType shaping/bidi have regression coverage. Actual Chinese keyboardinsertion/deletion and save/reopen renders are checked on all four private pages.Legacy non-SFNT previews, mixed-font/style contextual runs, structure-tree fidelity and reliable- semantic grouping on every untagged PDF remain open. Estimates are unchanged.+ semantic grouping on every untagged PDF remain open. Replacing one line or paragraph no longer+ removes a distinct neighbour whose glyph box overlaps (#1316); a second drawing on the same+ baseline is still replaced. Estimates are unchanged.- **Missing:** robust in-place editing of text PdfCraft didn't write: subset fonts without theneeded glyphs, CJK and right-to-left text, rotated text, lists, superscript/subscript, keeping@@ -312,6 +315,7 @@ update the numbers.| Date | Change | Summary ||---|---|---|+| 2026-10-12 | minor | #1316: replacing a line or paragraph keeps a neighbouring line whose glyph box overlaps. Gap 3 remains. Estimates unchanged. || 2026-10-12 | minor | Exclusive image crops resize with their pixels across nested states, intervening operators and content streams; shared clips remain fixed. Synthetic engine/tool regressions and private image save/reopen checks; estimates unchanged. || 2026-10-12 | minor | Gap 13: measured large-file memory; edits no longer keep the previous working file while writing the next (peak 3 → 2 copies); file-backed input recorded as blocked on gap 2 || 2026-10-11 | minor | Closed gap 4: the web build prints through the browser's print dialog (sheets drawn by PdfCraft at 150–300 dpi, one per printed page); number kept |diff --git a/docs/roadmap.md b/docs/roadmap.mdindex 42998b70f..32567e34b 100644--- a/docs/roadmap.md+++ b/docs/roadmap.md@@ -1,5 +1,6 @@# PdfCraft roadmap: milestones and what's next+> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M7 #1316: replacing a line keeps a neighbouring line whose glyph box overlaps; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M1 #1339: unchanged incremental saves of a classic cross-reference table write a zero-length subsection; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M3: Windows' Animation effects setting is followed, and Preferences has Animation effects; earlier: exclusive image-crop resize follow-up; M2: short same-line redraws split before placement; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M7: preserve Arabic ActualText typing order; earlier: M3: Windows' Animation effects setting is followed, and Preferences has Animation effects; earlier: exclusive image-crop resize follow-up; M2: short same-line redraws split before placement; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)@@ -88,7 +89,7 @@ total matches the parity estimate.| M4 | Engine, history, save, organize | 100–180 | 95% | 8–15 | Done:<br>- command registry (menus, shortcuts and palette all use it);<br>- undo/redo; incremental, atomic and encrypted saves;<br>- autosave and crash recovery;<br>- organize, combine, extract, split and insert-from-file, with identical fonts and images stored once;<br>- CLI `edit/combine/extract/split`.<br>Done since: Combine files in its own tab (sortable, resizable columns; folders; early warnings; unlocking protected files), bookmark editing, page labels (Number pages), CLI `run`, Set Page Boxes, Crop tool, Duplicate pages, Ctrl+A / Cmd+A to select all pages in Organize, Replace pages, bookmarks from tagged headings. Missing: page transitions, recovery on the web || M5 | Comments (all annotation types, XFDF) | 120–200 | 88% | 12–25 | Done: notes, highlight/underline/strikeout/squiggly, text boxes, ink, lines, arrows, rectangles, ovals, stamps (dynamic, Sign Here, Standard Business), with appearance streams; replies, status, checkmarks, locking, move/resize/restyle/delete; properties dialog; panel filter and sort; hide all; summaries (comments only); XFDF/FDF import and export (partial imports preserve existing reply and review-status links); flatten; Fill & Sign with adjustable text/date size; agent tools.<br>Done since: polygons, connected lines, clouds, callouts, inserted text, colour and checkmark filters; image signature pointer previews, selection handles and live image movement/resizing with proportional corners and independent edge handles. Missing: custom stamps, replace-text proposals, summary layouts with the page || M6 | Forms + JavaScript | 160–320 | 50% | 40–75 | Done: filling all field types with regenerated appearances; Prepare a form (every field type, multi-select/shared properties, move/resize/delete, Field Properties General/Appearance/Position/Options/Format/Validate/Calculate); Acrobat's AF format/keystroke/validate/calculate functions and simplified field notation run natively in Acrobat's event order; tab order; push-button actions; flatten; agent tools. Form data exchange (FDF, XFDF, XML, CSV, text) done.<br>Done since: JavaScript engine (boa, sandboxed) running custom keystroke/validate/calculate/format and button scripts, document JavaScripts, console. Missing: Actions tab, wider object model (annotations, layers, dialogs), XFA |-| M7 | Content editing (text, images, header/footer, watermark) | 250–500 | 20% | 100–180 | Done: header & footer, watermarks, backgrounds, Bates; added text and images that stay editable (move, resize, format, rotate, flip, crop, replace); links (Link tool, Link Properties, create from URLs, remove all). Done since: Edit text preserves Arabic/Hebrew `/ActualText` typing order, with font-independent regressions. Done since (#1116): editable text regions grouped across compatible words and subset fonts, one rich-text editor over a background with the source text removed, embedded sfnt faces reused as editor faces, and visible (clipped) bounds for cropped-image selection and resize. Exclusive crops now resize across nested states and content streams, with shared clips fixed.<br>Done since: #594 ordinary paragraph drags preserve overlapping source text; UI/engine regressions, native save/reopen, independent-reader checks and full CI passed in the Linux test environment. #1200 candidate: local GoToR links open in desktop tabs and through root-confined automation; appearance-only edits preserve existing actions. Named destinations remain unapplied and `/NewWindow` is a tab hint. Missing: editing existing text and images in place (the longest pole), image/PDF watermarks |+| M7 | Content editing (text, images, header/footer, watermark) | 250–500 | 20% | 100–180 | Done: header & footer, watermarks, backgrounds, Bates; added text and images that stay editable (move, resize, format, rotate, flip, crop, replace); links (Link tool, Link Properties, create from URLs, remove all). Done since: Edit text preserves Arabic/Hebrew `/ActualText` typing order, with font-independent regressions. Done since (#1116): editable text regions grouped across compatible words and subset fonts, one rich-text editor over a background with the source text removed, embedded sfnt faces reused as editor faces, and visible (clipped) bounds for cropped-image selection and resize. Exclusive crops now resize across nested states and content streams, with shared clips fixed.<br>Done since: #594 ordinary paragraph drags preserve overlapping source text; UI/engine regressions, native save/reopen, independent-reader checks and full CI passed in the Linux test environment. #1200 candidate: local GoToR links open in desktop tabs and through root-confined automation; appearance-only edits preserve existing actions. Named destinations remain unapplied and `/NewWindow` is a tab hint. #1316: replacing a line or paragraph keeps a neighbouring line whose glyph box overlaps when the baselines differ; a second copy on the same baseline is still replaced. Missing: editing existing text and images in place (the longest pole), image/PDF watermarks || M7 | Content editing (text, images, header/footer, watermark) | 250–500 | 20% | 100–180 | Done: header & footer, watermarks, backgrounds, Bates; added text and images that stay editable (move, resize, format, rotate, flip, crop, replace); links (Link tool, Link Properties, create from URLs, remove all). Missing: editing existing text and images in place (the longest pole), watermark print/screen visibility and repeat || M6 | Forms + JavaScript | 160–320 | 50% | 40–75 | Done: filling all field types with regenerated appearances; Prepare a form (every field type, multi-select/shared properties, move/resize/delete, Field Properties General/Appearance/Position/Options/Format/Validate/Calculate); Acrobat's AF format/keystroke/validate/calculate functions and simplified field notation run natively in Acrobat's event order; tab order; push-button actions; flatten; agent tools. Form data exchange (FDF, XFDF, XML, CSV, text) done.<br>Done since: JavaScript engine (boa, sandboxed) running custom keystroke/validate/calculate/format and button scripts, document JavaScripts, console. Missing: Actions tab, wider object model (annotations, layers, dialogs), XFA<br>Done since: Existing simple field-font encodings and Differences are respected when generating appearances; an unencodable value uses a separate Helvetica appearance font without changing the source font. Synthetic reopen regressions cover punctuation, subset fallback and multiline text. Exact font metrics/layout and broader Unicode fallback remain incomplete. || M6 | Forms + JavaScript | 160–320 | 50% | 40–75 | Done: filling all field types with regenerated appearances; Prepare a form (every field type, multi-select/shared properties, move/resize/delete, Field Properties General/Appearance/Position/Options/Format/Validate/Calculate); Acrobat's AF format/keystroke/validate/calculate functions and simplified field notation run natively in Acrobat's event order; tab order; push-button actions; flatten; agent tools. Form data exchange (FDF, XFDF, XML, CSV, text) done.<br>Done since: JavaScript engine (boa, sandboxed) running custom keystroke/validate/calculate/format and button scripts, document JavaScripts, console. Missing: Actions tab, wider object model (annotations, layers, dialogs), XFA<br>Done since: Tab and Shift-Tab wrapping to the same field or another widget of that field refresh the newly opened editor from the accepted value before Save. Synthetic UI regressions cover both directions, same-frame Save, validation refusal and undo/redo. |@@ -145,6 +146,7 @@ M2 (renderer), M7 (content editing), M10 (OCR and Office), M11 (Preflight and st| Date | Change | Summary ||---|---|---|+| 2026-10-12 | minor | M7 #1316: replacing a line or paragraph keeps a neighbouring line whose glyph box overlaps; same-baseline copies are still replaced. Estimates unchanged. || 2026-10-12 | minor | M1 #1339: unchanged incremental saves of a classic cross-reference table write a zero-length subsection. Estimates unchanged. || 2026-10-12 | minor | M12: bounded text-only auto-tag preview through the engine and automation; actual PDF structure writing and visual review remain open. Estimates unchanged. || 2026-10-12 | minor | M7: keep added Arabic copy/search in typing order with per-line ActualText; preserve that order in the editor and keep visual runs separate. Font-independent regressions and tool save/reopen coverage; font fallback and bidi typing remain partial. Estimates unchanged. |