Skip to content

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

fix(print): preserve existing appearances without Subtype (#3532)

Ahmad Mujahid1489436392b8
diff --git a/Cargo.lock b/Cargo.lock
index 68a758c2f..7f0b3270e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4278,6 +4278,7 @@ dependencies = [
"pdfcraft-content",
"pdfcraft-cos",
"pdfcraft-model",
+ "pdfcraft-render",
"thiserror 2.0.21",
]
diff --git a/ROADMAP.md b/ROADMAP.md
index b1283e775..bed4df890 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,5 +1,7 @@
# PdfCraft roadmap
+> **Last reviewed:** 2026-10-20 | **Last updated:** 2026-10-20 | **Change:** minor (M10, #3532 partial: vector printing retains existing appearances with absent Subtype; estimates unchanged)
+
**Stage: alpha** · next: beta, ~25% (ready for real work 50% → 75%) and ~400–700 h away
> **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)
@@ -172,6 +174,8 @@ Ranked; detail and the full milestone table in [docs/roadmap.md](docs/roadmap.md
## Progress log
+- **2026-10-20 (M10, #3532 partial):** Vector printing retains existing widget artwork when its appearance lacks Subtype. A print-owned copy adds Form dispatch metadata. The source stream and all explicit subtypes stay unchanged. Synthetic source/output raster checks cover resources, selected/shared appearances, placement, flags and content modes. Appearance regeneration and physical printer validation remain outside this fix. Estimates unchanged.
+
- **2026-10-19 (M14, #3373):** The main menu and its long submenus scroll in short windows, keeping their commands reachable. Estimates unchanged.
- **2026-10-19 (M3, #3387):** Save-prompt shortcuts yield to later consent and utility dialogs; a synthetic UI regression checks that an edited document stays open. Estimates unchanged.
@@ -552,6 +556,7 @@ Newest first: the date, what moved, and the new overall estimate.
| Date | Change | Summary |
|---|---|---|
+| 2026-10-20 | minor | M10, #3532 partial: vector printing retains existing appearances with absent Subtype; estimates unchanged. |
| 2026-10-18 | minor | M5, PR #1971: nested source `/Page` and `/Pages` dictionaries export as null without traversing page content or the page tree. Synthetic saved/reopened three-page regression retains unrelated metadata and aliases. FDF import semantics, copied-graph limits and estimates unchanged. |
| 2026-10-15 | minor | M5: budget retained FDF entries before cloning; discovery keeps lazy array owners and annotation positions, with alias/cache-eviction stress fixtures. Limits cover the copied graph; source parsing/page discovery retain existing COS/parser limits, with no total source-memory bound. FDF import semantics and estimates unchanged. |
| 2026-10-15 | minor | M7: the Edit text caret is as tall as the row it is on in a region with several sizes; estimates unchanged. |
diff --git a/crates/print/Cargo.toml b/crates/print/Cargo.toml
index 3c9b1071d..6ffa60b81 100644
--- a/crates/print/Cargo.toml
+++ b/crates/print/Cargo.toml
@@ -14,3 +14,6 @@ pdfcraft-cos = { workspace = true }
pdfcraft-content = { workspace = true }
pdfcraft-model = { workspace = true }
thiserror = { workspace = true }
+
+[dev-dependencies]
+pdfcraft-render = { workspace = true }
diff --git a/crates/print/src/lib.rs b/crates/print/src/lib.rs
index 802d9595b..3627ff8b1 100644
--- a/crates/print/src/lib.rs
+++ b/crates/print/src/lib.rs
@@ -777,6 +777,17 @@ fn page_form(doc: &mut Document, index: usize, content: Content) -> Result<ObjRe
let Some(ap) = appearance(doc, &d) else { continue };
let form = doc.get(ap).as_dict().cloned().unwrap_or_default();
let Some(m) = appearance_matrix(doc, &form, rect) else { continue };
+ let ap = if !form.contains(b"Subtype")
+ && let Object::Stream(stream) = &*doc.get(ap)
+ {
+ // Some existing annotation appearances omit Subtype, but Do dispatch needs a Form XObject.
+ // Keep the original intact: other document objects can share this appearance.
+ let mut stream = stream.clone();
+ stream.dict.set(b"Subtype".to_vec(), Object::name("Form"));
+ doc.add(Object::Stream(stream))
+ } else {
+ ap
+ };
let name = format!("PCPrA{k}");
k += 1;
let [a0, b0, c0, d0, e0, f0] = m.0;
diff --git a/crates/print/src/tests.rs b/crates/print/src/tests.rs
index 54cbbd4c7..4e1c3fa74 100644
--- a/crates/print/src/tests.rs
+++ b/crates/print/src/tests.rs
@@ -744,3 +744,5 @@ fn imposed_pages_preserve_large_user_unit_matrices() {
}
}
}
+
+mod appearances;
diff --git a/crates/print/src/tests/appearances.rs b/crates/print/src/tests/appearances.rs
new file mode 100644
index 000000000..caf0f0617
--- /dev/null
+++ b/crates/print/src/tests/appearances.rs
@@ -0,0 +1,217 @@
+use super::*;
+use pdfcraft_render::{PageRenderer, RenderConfig, RenderRequest, RenderedPage, RequestKind};
+
+fn numbers(values: &[f64]) -> Object {
+ Object::Array(values.iter().copied().map(Object::Real).collect())
+}
+
+// Contributor-original artwork uses a named color resource, without fonts or external assets.
+fn widget_fixture(subtype: Option<Object>, matrix: Option<[f64; 6]>) -> (Document, ObjRef, ObjRef) {
+ let mut doc = fixture(1);
+ let page = pdfcraft_model::pages(&doc)[0].obj;
+ let mut colors = Dict::new();
+ colors.set(b"Ink".to_vec(), Object::name("DeviceRGB"));
+ let mut resources = Dict::new();
+ resources.set(b"ColorSpace".to_vec(), Object::Dict(colors));
+ let resources = doc.add(Object::Dict(resources));
+ let mut d = Dict::new();
+ d.set(b"BBox".to_vec(), numbers(&[0.0, 0.0, 20.0, 10.0]));
+ d.set(b"Resources".to_vec(), Object::Ref(resources));
+ d.set(b"PrivateKey".to_vec(), Object::name("PreserveMe"));
+ if let Some(subtype) = subtype {
+ d.set(b"Subtype".to_vec(), subtype);
+ }
+ if let Some(matrix) = matrix {
+ d.set(b"Matrix".to_vec(), numbers(&matrix));
+ }
+ let mut stream = Stream::flate(d, b"/Ink cs 0 1 0 scn 0 0 20 10 re f");
+ stream.dict.set(b"DecodeParms".to_vec(), Object::Dict(Dict::new()));
+ let ap = doc.add(Object::Stream(stream));
+ let mut widget = Dict::new();
+ widget.set(b"Subtype".to_vec(), Object::name("Widget"));
+ widget.set(b"FT".to_vec(), Object::name("Tx"));
+ widget.set(b"F".to_vec(), Object::Int(4));
+ widget.set(b"Rect".to_vec(), numbers(&[10.0, 20.0, 50.0, 40.0]));
+ let mut appearance = Dict::new();
+ appearance.set(b"N".to_vec(), Object::Ref(ap));
+ widget.set(b"AP".to_vec(), Object::Dict(appearance));
+ let widget = doc.add(Object::Dict(widget));
+ let contents = doc.add(Object::Stream(Stream::flate(Dict::new(), b"0 0 1 rg 0 0 8 8 re f")));
+ doc.update_dict(page, |d| {
+ d.set(b"MediaBox".to_vec(), numbers(&[0.0, 0.0, 100.0, 100.0]));
+ d.set(b"Annots".to_vec(), Object::Array(vec![Object::Ref(widget)]));
+ d.set(b"Contents".to_vec(), Object::Ref(contents));
+ d.set(b"Resources".to_vec(), Object::Dict(Dict::new()));
+ })
+ .unwrap();
+ (doc, ap, widget)
+}
+
+fn print_settings(content: Content) -> Settings {
+ Settings { pages: vec![0], paper: (100.0, 100.0), layout: Layout::Size(SizeMode::Actual), content, ..Settings::default() }
+}
+
+fn render(bytes: Vec<u8>) -> RenderedPage {
+ let page = PageRenderer::new(Arc::new(bytes), RenderConfig::default()).render(RenderRequest {
+ page: 0,
+ kind: RequestKind::Pixels,
+ tile: None,
+ scale: 1.0,
+ tag: 0,
+ preview: false,
+ });
+ assert_eq!(page.error, None);
+ assert!(page.warnings.is_empty(), "{:?}", page.warnings);
+ assert_eq!((page.width, page.height), (100, 100));
+ page
+}
+
+fn pixel(page: &RenderedPage, x: usize, y: usize) -> &[u8] {
+ let offset = (y * page.width as usize + x) * 4;
+ &page.rgba[offset..offset + 4]
+}
+
+fn saved(doc: &Document) -> Vec<u8> {
+ write_full(doc, &SaveOptions::default()).unwrap()
+}
+
+fn xobject(doc: &Document, owner: &Dict, name: &[u8]) -> ObjRef {
+ let resources = doc.resolve(owner.get(b"Resources").unwrap());
+ let objects = doc.resolve(resources.as_dict().unwrap().get(b"XObject").unwrap());
+ objects.as_dict().unwrap().get(name).unwrap().as_ref().unwrap()
+}
+
+#[test]
+fn missing_subtype_appearance_survives_vector_print() {
+ let (control, _, _) = widget_fixture(Some(Object::name("Form")), None);
+ let control = render(impose(&control, &print_settings(Content::Document)).unwrap());
+ assert_eq!(pixel(&control, 30, 70), [0, 255, 0, 255], "valid Form control");
+ let (doc, ap, _) = widget_fixture(None, None);
+ let before = saved(&doc);
+ let state = doc.read_state();
+ let source_bytes = doc.bytes().clone();
+ let graph: Vec<_> = doc.scan_objects().collect();
+ let original = doc.get(ap);
+ let source = render(before.clone());
+ assert_eq!(pixel(&source, 30, 70), [0, 255, 0, 255], "source display");
+ let output = impose(&doc, &print_settings(Content::Document)).unwrap();
+ let reopened = Document::open(Arc::new(output.clone())).unwrap();
+ assert_eq!(pdfcraft_model::pages(&reopened).len(), 1);
+ let printed = render(output);
+ assert_eq!(pixel(&printed, 5, 5), [255, 255, 255, 255], "outside the appearance");
+ assert_eq!(pixel(&printed, 30, 70), [0, 255, 0, 255], "imposed missing-Subtype appearance");
+ assert_eq!(printed.rgba, control.rgba);
+ assert!(state.matches(&doc));
+ assert_eq!(doc.bytes(), &source_bytes);
+ assert_eq!(doc.scan_objects().collect::<Vec<_>>(), graph);
+ assert_eq!(doc.get(ap), original);
+ assert_eq!(saved(&doc), before);
+ let source = Document::open(Arc::new(before)).unwrap();
+ let page = &pdfcraft_model::pages(&source)[0];
+ let annots = source.resolve(page.dict.get(b"Annots").unwrap());
+ let widget = source.resolve(&annots.as_array().unwrap()[0]);
+ let selected = appearance(&source, widget.as_dict().unwrap()).unwrap();
+ let Object::Stream(stream) = &*source.get(selected) else { panic!("source AP stream") };
+ assert!(!stream.dict.contains(b"Subtype") && !stream.dict.contains(b"Type"));
+ assert_eq!(stream.decoded().unwrap(), b"/Ink cs 0 1 0 scn 0 0 20 10 re f");
+ assert_eq!(source.resolve(stream.dict.get(b"Resources").unwrap()), doc.resolve(original.as_dict().unwrap().get(b"Resources").unwrap()));
+ let sheet = &pdfcraft_model::pages(&reopened)[0];
+ let form = reopened.get(xobject(&reopened, &sheet.dict, b"P0"));
+ let promoted = reopened.get(xobject(&reopened, form.as_dict().unwrap(), b"PCPrA0"));
+ let Object::Stream(promoted) = &*promoted else { panic!("promoted AP stream") };
+ assert_eq!(promoted.dict.name(b"Subtype"), Some(b"Form".as_slice()));
+ let Object::Stream(original) = &*original else { panic!("original AP stream") };
+ assert_eq!(promoted.raw, original.raw);
+ let mut expected = original.dict.clone();
+ let mut actual = promoted.dict.clone();
+ actual.remove(b"Subtype");
+ actual.remove(b"Length");
+ expected.remove(b"Length");
+ let expected_resources = doc.resolve(expected.remove(b"Resources").as_ref().unwrap());
+ let actual_resources = reopened.resolve(actual.remove(b"Resources").as_ref().unwrap());
+ assert_eq!(actual_resources, expected_resources);
+ // The writer can spell integral Real values as integers. Compare their PDF values.
+ let mut actual_bytes = Vec::new();
+ let mut expected_bytes = Vec::new();
+ pdfcraft_cos::serialize(&Object::Dict(actual), &mut actual_bytes);
+ pdfcraft_cos::serialize(&Object::Dict(expected), &mut expected_bytes);
+ assert_eq!(actual_bytes, expected_bytes);
+}
+
+#[test]
+fn promotion_preserves_streams_and_explicit_subtypes() {
+ for subtype in [None, Some(Object::name("Form")), Some(Object::name("Image")), Some(Object::Null), Some(Object::Int(7))] {
+ let (mut doc, ap, _) = widget_fixture(subtype.clone(), Some([2.0, 0.0, 0.0, 3.0, 5.0, 7.0]));
+ let original = doc.get(ap);
+ let form = page_form(&mut doc, 0, Content::Document).unwrap();
+ assert_eq!(doc.get(ap), original, "original in the print clone");
+ let promoted = xobject(&doc, doc.get(form).as_dict().unwrap(), b"PCPrA0");
+ if subtype.is_some() {
+ assert_eq!(promoted, ap, "an explicit subtype keeps its object");
+ let printed = Document::open(Arc::new(impose(&doc, &print_settings(Content::Document)).unwrap())).unwrap();
+ let sheet = &pdfcraft_model::pages(&printed)[0];
+ let page_form = printed.get(xobject(&printed, &sheet.dict, b"P0"));
+ let printed_ap = printed.get(xobject(&printed, page_form.as_dict().unwrap(), b"PCPrA0"));
+ assert_eq!(printed_ap.as_dict().unwrap().get(b"Subtype"), subtype.as_ref(), "explicit subtype survives serialization");
+ } else {
+ assert_ne!(promoted, ap, "repair needs a separate object");
+ let Object::Stream(mut expected) = (*original).clone() else { panic!("AP stream") };
+ expected.dict.set(b"Subtype".to_vec(), Object::name("Form"));
+ assert_eq!(*doc.get(promoted), Object::Stream(expected), "only Subtype changes, including encoded data and resource refs");
+ }
+ }
+}
+
+#[test]
+fn selected_shared_appearances_keep_placement_flags_and_content_modes() {
+ let mut default_images = Vec::new();
+ for matrix in [None, Some([2.0, 0.0, 0.0, 3.0, 5.0, 7.0])] {
+ let (mut doc, ap, widget) = widget_fixture(None, matrix);
+ // Optional Type does not replace the required Subtype.
+ doc.update_dict(ap, |d| d.set(b"Type".to_vec(), Object::name("XObject"))).unwrap();
+ let Object::Stream(mut off) = (*doc.get(ap)).clone() else { panic!("AP stream") };
+ off.raw = Stream::flate(off.dict.clone(), b"/Ink cs 1 0 0 scn 0 0 20 10 re f").raw;
+ let off = doc.add(Object::Stream(off));
+ let mut states = Dict::new();
+ states.set(b"On".to_vec(), Object::Ref(ap));
+ states.set(b"Off".to_vec(), Object::Ref(off));
+ let mut appearances = Dict::new();
+ appearances.set(b"N".to_vec(), Object::Dict(states));
+ doc.update_dict(widget, |d| {
+ d.set(b"AP".to_vec(), Object::Dict(appearances));
+ d.set(b"AS".to_vec(), Object::name("On"));
+ })
+ .unwrap();
+ let mut widgets = vec![Object::Ref(widget)];
+ for (rect, flags) in [([60.0, 20.0, 90.0, 40.0], 4), ([10.0, 60.0, 50.0, 80.0], 0), ([60.0, 60.0, 90.0, 80.0], 6)] {
+ let mut copy = doc.get(widget).as_dict().unwrap().clone();
+ copy.set(b"Rect".to_vec(), numbers(&rect));
+ copy.set(b"F".to_vec(), Object::Int(flags));
+ widgets.push(Object::Ref(doc.add(Object::Dict(copy))));
+ }
+ let page = pdfcraft_model::pages(&doc)[0].obj;
+ doc.update_dict(page, |d| d.set(b"Annots".to_vec(), Object::Array(widgets))).unwrap();
+ let before = saved(&doc);
+ for (mode, content) in
+ [Content::Document, Content::DocumentAndMarkups, Content::DocumentAndStamps, Content::FormFieldsOnly].into_iter().enumerate()
+ {
+ let output = impose(&doc, &print_settings(content)).unwrap();
+ let reopened = Document::open(Arc::new(output.clone())).unwrap();
+ assert_eq!(pdfcraft_model::pages(&reopened).len(), 1);
+ let page = render(output);
+ for (x, y, expected) in
+ [(30, 70, [0, 255, 0, 255]), (75, 70, [0, 255, 0, 255]), (30, 30, [255, 255, 255, 255]), (75, 30, [255, 255, 255, 255])]
+ {
+ assert_eq!(pixel(&page, x, y), expected, "{matrix:?}, {content:?}, ({x},{y})");
+ }
+ let expected = if content == Content::FormFieldsOnly { [255, 255, 255, 255] } else { [0, 0, 255, 255] };
+ assert_eq!(pixel(&page, 4, 96), expected, "document artwork under {content:?}");
+ if matrix.is_none() {
+ default_images.push(page.rgba);
+ } else {
+ assert_eq!(page.rgba, default_images[mode], "Matrix must preserve the complete appearance extent under {content:?}");
+ }
+ }
+ assert_eq!(saved(&doc), before, "shared source graph stays unchanged");
+ }
+}
diff --git a/docs/roadmap.md b/docs/roadmap.md
index 5d73511e9..1c8722f86 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -1,5 +1,7 @@
# PdfCraft roadmap: milestones and what's next
+> **Last reviewed:** 2026-10-20 | **Last updated:** 2026-10-20 | **Change:** minor (M10, #3532 partial: vector printing retains existing appearances with absent Subtype; 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-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)
@@ -145,7 +147,7 @@ total matches the parity estimate.
| 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), image/PDF watermarks |
| M8 | Security + redaction | 100–180 | 68% | 15–30 | Done: opening protected documents, permissions, Protect Using Password, Remove security; redaction (mark text/areas/pages, Search & Redact with patterns, apply removing glyphs, image pixels, vectors, XObject content, annotations and fields, verification, full rewrite on save); Remove hidden information and Sanitize.<br>Done since: redaction codes (U.S. FOIA and Privacy Act sets as overlay text, in Redaction properties and `redact_mark`). Redaction cleans indirect and form structure references, preserving surviving form tags. Redaction retires inherited resource dictionaries, so a parent `/Pages` can't keep a removed XObject reachable; unredacted pages are left untouched. Image redaction removes alternate images and unsupported masks only on affected images. Changed marked-content spans lose replacement descriptions; untouched spans keep theirs. Hidden-text cleanup retires unused named descriptions across inherited/shared page and form resources (64 focused tests and scoped Rust 1.96 Clippy/wasm checks pass; publication CI pending). Missing: certificate security, custom redaction code sets and pattern locales, DCT re-encoding |
| M9 | Signatures (PAdES, validation) | 160–280 | 60% | 40–70 | Done: new `sign` crate (DER, X.509, CMS, PKCS #12 on RustCrypto; aws-lc-rs for RSA private keys); PAdES B-B signing (visible, invisible, existing fields, certification with DocMDP); validation with trust store and changes-after-signing classification; self-signed digital IDs; Signatures panel, message bar, sign dialogs; agent tools. Checked with pdfsig and OpenSSL.<br>Done since: macOS Keychain and Windows Current User Personal store signing (software-backed CNG keys), certificate viewer, signed documents protected from rewrites, page validation overlays separate from original signature artwork (baked Not Verified captions remain; #79 open), snapshot tabs that reuse instead of multiplying. Missing: timestamps (B-T), LTV (DSS, OCSP, CRL), FieldMDP, smart cards, PKCS #11 |
-| M10 | OCR, create, export, print | 200–350 | 33% | 120–215 | Done: create from blank/text/PNG/JPEG/TIFF (multi-page)/GIF/BMP; export PNG/JPEG/TIFF and text; Print (Acrobat's sizing, n-up, booklet, poster, comments & forms, preview, the CUPS and Windows spoolers, print-ready PDF).<br>Done since: embedded/72/custom DPI choices for image imports; export all images; OCR (searchable image for pages, ranges and multiple files); single-sided cut-and-stack imposition with cut marks, through Print and doc_print; architectural/ANSI/large ISO sheet presets, Match page at 100% and PDF-scale preview (#599 follow-up); Create PDF from multiple files (PDFs, images and text, edited as pages in the grid); OCR can also read pictures on pages that have text, without adding that text twice (#1028). Done since: Word invoice export uses borderless inferred tables, floating positioned text/artwork only where text overlaps an image or is rotated, and per-page sizes, covered by synthetic invoice automation regressions (#773); printing on the web through the browser's print dialog, sheets drawn by PdfCraft (gap 4). Lossless image export applies per-component Decode, including Indexed mapping (#1201 partial). Existing 16-bit precision and color-management limits remain. #3120: Office export reads form XObjects 50 levels deep, as the renderer does, and up to 50 000 a page; pages past that are listed in `truncated_pages`. Missing: OCR languages beyond Latin, editable-text OCR output, full Office layout fidelity/import |
+| M10 | OCR, create, export, print | 200–350 | 33% | 120–215 | Done: create from blank/text/PNG/JPEG/TIFF (multi-page)/GIF/BMP; export PNG/JPEG/TIFF and text; Print (Acrobat's sizing, n-up, booklet, poster, comments & forms, preview, the CUPS and Windows spoolers, print-ready PDF).<br>Done since: embedded/72/custom DPI choices for image imports; export all images; OCR (searchable image for pages, ranges and multiple files); single-sided cut-and-stack imposition with cut marks, through Print and doc_print; architectural/ANSI/large ISO sheet presets, Match page at 100% and PDF-scale preview (#599 follow-up); Create PDF from multiple files (PDFs, images and text, edited as pages in the grid); OCR can also read pictures on pages that have text, without adding that text twice (#1028). Done since: Word invoice export uses borderless inferred tables, floating positioned text/artwork only where text overlaps an image or is rotated, and per-page sizes, covered by synthetic invoice automation regressions (#773); printing on the web through the browser's print dialog, sheets drawn by PdfCraft (gap 4). Lossless image export applies per-component Decode, including Indexed mapping (#1201 partial). Existing 16-bit precision and color-management limits remain. #3532 partial: vector printing retains existing appearances with absent Subtype through a print-owned Form copy; source artwork stays unchanged. #3120: Office export reads form XObjects 50 levels deep, as the renderer does, and up to 50 000 a page; pages past that are listed in `truncated_pages`. Missing: OCR languages beyond Latin, editable-text OCR output, full Office layout fidelity/import |
| M11 | Optimize, preflight, PDF/A/X/UA, print production | 200–350 | 18% | 80–140 | Done: new `optimize` crate: Reduce File Size and the PDF Optimizer (images measured where drawn, bicubic downsampling, JPEG/ZIP recompression only when smaller, discard objects and user data, Flate clean-up, resource merging, object streams). Missing: fonts and transparency panels, space audit, preflight, PDF/A/X/UA |
| M12 | Accessibility, compare, measure, search, XFA | 200–380 | 30% | 90–160 | Done: new `a11y` crate with the Accessibility Checker (all 32 rules, report, Fix/Skip/Explain, options dialog and results panel, agent tools). Locatable figure, annotation and form findings highlight their page bounds.<br>Done since: 2D distance, perimeter and area measurements with persistent viewport calibration, snapping, live information and CSV export; a bounded, text-only auto-tag proposal tool for one page. Marking a figure decorative rewrites only that stream (#1324). An XFA radio item whose value contains a space is written back unchanged (#1319). Missing: writing proposed tags and parent tree, field autotag, visual Tags/Order/Content panels, Reading Order tool, compare, geospatial/3D measurement, search index, XFA |
| M13 | Automation (MCP, Action Wizard, CLI) + AI providers | 60–120 | 45% | 25–45 | Done: MCP resources (document info, text, page images); headless tool table (123 tools incl. signing, optimizing, initial view, links, stamps, data exchange, comment review, forms authoring and scripts, redaction, sanitize, print, add content), opt-in MCP server over stdio, CLI `run`/`tools` (closed stdout pipes exit cleanly), UI control channel with drag. Missing: Action Wizard, AI providers<br>Done since: CLI run and MCP reject missing, empty, repeated and option-valued --root arguments before any tool/script execution or MCP initialization. A single-hyphen directory name remains valid; synthetic CLI regressions preserve a would-be overwritten file. `text_find` also caps the per-page match ranges it materializes at the remaining result limit plus one continuation match. CLI robustness scans visit each directory once through overlapping roots and symlink aliases. |
@@ -200,6 +202,7 @@ M2 (renderer), M7 (content editing), M10 (OCR and Office), M11 (Preflight and st
| Date | Change | Summary |
|---|---|---|
+| 2026-10-20 | minor | M10, #3532 partial: vector printing retains existing appearances with absent Subtype; 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 |