From 08dd0906ca17d4df99d6d1c5b14105d697ae1783 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 3 Nov 2026 04:40:16 +0000 Subject: [PATCH] ODT: fixed fields as locked fields with their values; sender fields A fixed date or time (text:fixed) opens as a locked field and is written back fixed, with the value its text shows under its picture (text:date-value / text:time-value), which LibreOffice needs to keep it. One whose text can't be read back is written as text. Sender fields open as SENDER fields and are written back as text:sender-*. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GBVQLyDnrG8Tn1yDQcUabC --- crates/formats/src/model/from_doc.rs | 4 +- crates/formats/src/model/to_doc.rs | 4 +- crates/formats/src/model/types.rs | 2 + crates/formats/src/odt/body.rs | 4 +- crates/formats/src/odt/body/indexes.rs | 2 +- crates/formats/src/odt/body/notes.rs | 7 +- crates/formats/src/odt/cell_formula.rs | 2 +- crates/formats/src/odt/datastyle.rs | 116 ++++++++++++++++++++ crates/formats/src/odt/fields.rs | 62 ++++++++++- crates/formats/src/odt/tests_more/fields.rs | 41 ++++++- crates/formats/src/odt/writer.rs | 27 +++-- docs/file-format-parity.md | 3 +- 12 files changed, 242 insertions(+), 32 deletions(-) diff --git a/crates/formats/src/model/from_doc.rs b/crates/formats/src/model/from_doc.rs index 2b1cbf6ca0..888bd812e0 100644 --- a/crates/formats/src/model/from_doc.rs +++ b/crates/formats/src/model/from_doc.rs @@ -289,8 +289,8 @@ fn rich_inlines(doc: &Document, o: &InlineObject, f: &Fmt, opts: FlowOpts) -> Op InlineObject::FieldEnd if opts.fields => vec![Inline::FieldEnd], // Where a bookmark ends, so it covers its text (Word's `_GoBack` is the last edit's spot). InlineObject::BookmarkEnd { name } if opts.fields && name != "_GoBack" => vec![Inline::AnchorEnd(name.clone())], - InlineObject::Field { instr, result, .. } if opts.fields => { - vec![Inline::Field { instr: instr.clone(), result: result.clone(), fmt: f.clone() }] + InlineObject::Field { instr, result, locked, .. } if opts.fields => { + vec![Inline::Field { instr: instr.clone(), result: result.clone(), fmt: f.clone(), locked: *locked }] } _ => return None, }) diff --git a/crates/formats/src/model/to_doc.rs b/crates/formats/src/model/to_doc.rs index 4d4cfda6ed..b93a873fa2 100644 --- a/crates/formats/src/model/to_doc.rs +++ b/crates/formats/src/model/to_doc.rs @@ -569,13 +569,13 @@ impl<'a> Builder<'a> { append(&mut out, "", &CharProps { style: Some(style.into()), ..Default::default() }, Some(obj)); } } - Inline::Field { instr, result, fmt } => { + Inline::Field { instr, result, fmt, locked } => { let cp = self.budget(char_props(fmt)); let (instr, result) = (clean_text(instr), clean_text(result)); if instr.trim().is_empty() { append(&mut out, &result, &cp, None); } else { - let obj = InlineObject::Field { instr, result, locked: false, dirty: false, code: false, form: String::new() }; + let obj = InlineObject::Field { instr, result, locked: *locked, dirty: false, code: false, form: String::new() }; append(&mut out, "", &cp, Some(obj)); } } diff --git a/crates/formats/src/model/types.rs b/crates/formats/src/model/types.rs index 31a7a1b4d6..1edd3b21a5 100644 --- a/crates/formats/src/model/types.rs +++ b/crates/formats/src/model/types.rs @@ -232,6 +232,8 @@ pub enum Inline { instr: String, result: String, fmt: Fmt, + /// Its result is kept, not worked out again (Word's locked field, ODF's `text:fixed`). + locked: bool, }, /// A footnote or endnote: its custom mark (empty: numbered) and its content, without the /// note's own mark. Only flows asked for notes ([`FlowOpts::notes`]) hold them; formats diff --git a/crates/formats/src/odt/body.rs b/crates/formats/src/odt/body.rs index 9bf8533337..1cedb41f05 100644 --- a/crates/formats/src/odt/body.rs +++ b/crates/formats/src/odt/body.rs @@ -1102,7 +1102,7 @@ impl Body<'_> { && let Some(set) = super::fields::set_instr(a) { let fmt = self.cur_fmt(); - self.push_inline(Inline::Field { instr: set, result: String::new(), fmt }); + self.push_inline(Inline::Field { instr: set, result: String::new(), fmt, locked: false }); if get(a, "text:display").map(str::trim) == Some("none") { self.skip = 1; return true; @@ -1176,7 +1176,7 @@ impl Body<'_> { }) .collect(); if let Some(instr) = super::fields::xe_instr(k1.as_deref(), k2.as_deref(), &text) { - let field = Inline::Field { instr, result: String::new(), fmt: Fmt::default() }; + let field = Inline::Field { instr, result: String::new(), fmt: Fmt::default(), locked: false }; // Inside a run: split it there. let split = match p.inlines.get_mut(from) { Some(Inline::Text(t, f)) if off > 0 && t.is_char_boundary(off) && off < t.len() => { diff --git a/crates/formats/src/odt/body/indexes.rs b/crates/formats/src/odt/body/indexes.rs index ff0bc2c8f1..f8679af4c4 100644 --- a/crates/formats/src/odt/body/indexes.rs +++ b/crates/formats/src/odt/body/indexes.rs @@ -103,7 +103,7 @@ impl Body<'_> { _ => None, }; if let Some(FBlock::Para(p)) = titled { - p.inlines.push(Inline::Field { instr, result: String::new(), fmt: Fmt::default() }); + p.inlines.push(Inline::Field { instr, result: String::new(), fmt: Fmt::default(), locked: false }); return; } let Some(entries) = blocks.get_mut(start..) else { return }; diff --git a/crates/formats/src/odt/body/notes.rs b/crates/formats/src/odt/body/notes.rs index 1a987c1988..4c57ccbd83 100644 --- a/crates/formats/src/odt/body/notes.rs +++ b/crates/formats/src/odt/body/notes.rs @@ -334,11 +334,8 @@ impl Body<'_> { let at = if before.trim() == label { 0 } else { p.inlines.len() }; p.inlines.insert(at, Inline::Anchor(name.clone())); } - if fixed && !result.trim().is_empty() { - p.push_text(&result, &fmt); - } else { - p.inlines.push(Inline::Field { instr, result: result.trim().to_string(), fmt }); - } + // A fixed field keeps what it shows (§19.807 `text:fixed`): a locked field. + p.inlines.push(Inline::Field { instr, result: result.trim().to_string(), fmt, locked: fixed && !result.trim().is_empty() }); if let Some(name) = anchor { p.inlines.push(Inline::AnchorEnd(name)); } diff --git a/crates/formats/src/odt/cell_formula.rs b/crates/formats/src/odt/cell_formula.rs index 041004fa42..3f0cfe3c1b 100644 --- a/crates/formats/src/odt/cell_formula.rs +++ b/crates/formats/src/odt/cell_formula.rs @@ -319,7 +319,7 @@ pub(super) fn into_field(blocks: &mut [FBlock], instr: String) { } let fmt = p.inlines.iter().find_map(|i| if let Inline::Text(_, f) = i { Some(f.clone()) } else { None }).unwrap_or_default(); let result: String = p.inlines.iter().filter_map(|i| if let Inline::Text(t, _) = i { Some(t.as_str()) } else { None }).collect(); - p.inlines = vec![Inline::Field { instr, result: result.trim().to_owned(), fmt }]; + p.inlines = vec![Inline::Field { instr, result: result.trim().to_owned(), fmt, locked: false }]; } /// The formula field a cell is, when it is one: its field code and the result it shows (a cell diff --git a/crates/formats/src/odt/datastyle.rs b/crates/formats/src/odt/datastyle.rs index b64056b306..7cc55799f5 100644 --- a/crates/formats/src/odt/datastyle.rs +++ b/crates/formats/src/odt/datastyle.rs @@ -222,3 +222,119 @@ pub(super) fn auto_ordered(parts: &[Part]) -> Vec { } out } + +/// English month names, in order; a month shown is its name or the start of it (three letters +/// or more). +const MONTHS: [&str; 12] = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"]; + +/// The value a date or time shown as `shown` under Word picture `pic` stands for, as a fixed +/// field's `text:date-value` / `text:time-value` (§19.871, §19.880) state it: `YYYY-MM-DD`, with +/// `Thh:mm:ss` when it shows a time (on 1899-12-30, ODF's day 0, when it shows no date). `None` +/// when the text doesn't read under the picture (month names in another language, say). +pub(super) fn value_shown(pic: &str, shown: &str) -> Option { + let parts = parts_of(pic); + let s: Vec = shown.trim().chars().take(MAX_PICTURE).collect(); + let mut i = 0usize; + let (mut day, mut month, mut year) = (None, None, None); + let (mut hour, mut minute, mut second, mut pm) = (None, None, 0u32, None); + // A run of digits (at most `max`) or of letters at `i`. + let digits = |i: &mut usize, max: usize| -> Option { + let start = *i; + while *i - start < max && s.get(*i).is_some_and(char::is_ascii_digit) { + *i += 1; + } + s.get(start..*i).filter(|d| !d.is_empty())?.iter().collect::().parse().ok() + }; + let word = |i: &mut usize| -> String { + let start = *i; + while s.get(*i).is_some_and(|c| c.is_alphabetic()) { + *i += 1; + } + s.get(start..*i).map(|w| w.iter().collect::().to_lowercase()).unwrap_or_default() + }; + for p in &parts { + match p { + Part::Text(t) => { + for c in t.chars() { + match s.get(i) { + Some(&got) if got.eq_ignore_ascii_case(&c) => i += 1, + // Spaces are loose: one shown where the picture has none, or none where it has one. + Some(&got) if got.is_whitespace() => i += 1, + _ if c.is_whitespace() => {} + _ => return None, + } + } + } + Part::Day(_) => day = Some(digits(&mut i, 2)?), + Part::Month(_, false) => month = Some(digits(&mut i, 2)?), + Part::Month(_, true) => { + let w = word(&mut i); + let n = MONTHS.iter().position(|m| w.len() >= 3 && m.starts_with(w.as_str()))?; + month = Some(u32::try_from(n).ok()? + 1); + } + Part::Year(_) => { + let start = i; + let y = digits(&mut i, 4)?; + // Two digits: Word's window, 1930–2029. + year = Some(if i - start <= 2 { if y < 30 { 2000 + y } else { 1900 + y } } else { y }); + } + Part::Weekday(_) => { + if word(&mut i).is_empty() { + return None; + } + } + Part::Hours(_) => hour = Some(digits(&mut i, 2)?), + Part::Minutes(_) => minute = Some(digits(&mut i, 2)?), + Part::Seconds(_) => second = digits(&mut i, 2)?, + Part::AmPm => { + let w = word(&mut i); + pm = Some(match w.as_str() { + "am" | "a" => false, + "pm" | "p" => true, + _ => return None, + }); + } + } + } + if i < s.len() { + return None; + } + let time = match (hour, minute) { + (Some(h), m) => { + let h = match pm { + Some(true) if h < 12 => h + 12, + Some(false) if h == 12 => 0, + _ => h, + }; + let m = m.unwrap_or(0); + (h < 24 && m < 60 && second < 60).then(|| format!("T{h:02}:{m:02}:{second:02}"))? + } + (None, Some(_)) => return None, + (None, None) => String::new(), + }; + let date = match (year, month, day) { + (Some(y), Some(m), Some(d)) if (1..=12).contains(&m) && (1..=31).contains(&d) && y <= 9999 => format!("{y:04}-{m:02}-{d:02}"), + (None, None, None) if !time.is_empty() => "1899-12-30".to_string(), + _ => return None, + }; + Some(format!("{date}{time}")) +} + +#[cfg(test)] +mod value_tests { + use super::value_shown; + + #[test] + fn a_shown_date_or_time_reads_back_under_its_picture() { + assert_eq!(value_shown("dddd, MMMM dd, yyyy", "Sunday, November 01, 2026").as_deref(), Some("2026-11-01")); + assert_eq!(value_shown("dd/MM/yy", "03/11/26").as_deref(), Some("2026-11-03")); + assert_eq!(value_shown("hh:mm AM/PM", "04:04 PM").as_deref(), Some("1899-12-30T16:04:00")); + assert_eq!(value_shown("d MMM yyyy H:mm:ss", "5 Mar 1999 7:08:09").as_deref(), Some("1999-03-05T07:08:09")); + // Not readable: another language's month, extra text, an impossible day, junk. + assert_eq!(value_shown("d MMMM yyyy", "5 mars 2026"), None); + assert_eq!(value_shown("d MMMM yyyy", "5 March 2026 and more"), None); + assert_eq!(value_shown("dd/MM/yyyy", "45/11/2026"), None); + assert_eq!(value_shown("dd/MM/yyyy", ""), None); + assert_eq!(value_shown("", "anything"), None); + } +} diff --git a/crates/formats/src/odt/fields.rs b/crates/formats/src/odt/fields.rs index 2a97bf6cef..115eb68942 100644 --- a/crates/formats/src/odt/fields.rs +++ b/crates/formats/src/odt/fields.rs @@ -35,13 +35,63 @@ const SIMPLE: &[(&str, &str)] = &[ ("print-date", "PRINTDATE"), ]; +/// The sender fields (§7.3.6 `text:sender-firstname` … §7.3.7 `text:sender-state-or-province`). +const SENDER_PARTS: [&str; 18] = [ + "firstname", + "lastname", + "initials", + "title", + "position", + "email", + "phone-private", + "fax", + "company", + "phone-work", + "street", + "city", + "postal-code", + "country", + "state-or-province", + "country-code", + "street-number", + "address", +]; + +/// `el`, a field element, fixed at what it shows (§19.807 `text:fixed`), for the fields that can +/// be. +/// Field element `el` for locked field `instr` showing `result`, fixed (see [`fixed`]). A date +/// or time is fixed at the value its text shows under its picture (§19.871, §19.880); `None` +/// when that can't be read, as a reader shows a fixed date without a value as today's (then it +/// is written as its text). +pub(super) fn locked(el: &str, instr: &str, result: &str) -> Option { + let code = instr.split_whitespace().next().unwrap_or("").to_ascii_uppercase(); + let attr = match code.as_str() { + "DATE" => "text:date-value", + "TIME" => "text:time-value", + _ => return Some(fixed(el)), + }; + let value = super::datastyle::picture_of(instr).and_then(|pic| super::datastyle::value_shown(&pic, result))?; + let el = fixed(el); + let (tag, rest) = el.find(['>', ' ']).and_then(|at| Some((el.get(..at)?, el.get(at..)?)))?; + Some(format!("{tag} {attr}=\"{value}\"{rest}")) +} + +pub(super) fn fixed(el: &str) -> String { + const FIXABLE: [&str; 6] = ["', ' ']).and_then(|at| Some((el.get(..at)?, el.get(at..)?))) { + Some((tag, rest)) => format!("{tag} text:fixed=\"true\"{rest}"), + None => el.to_string(), + } +} + /// The Word field code for the `text:` field element `local` with attributes `a`, or `None` /// when it is no field WordCraft keeps (then its text is read as text). pub(super) fn instr_of(local: &str, a: &Attrs, picture: impl Fn(&str) -> Option) -> Option { // Fixed, unless it holds no value to be fixed at (LibreOffice's templates: a date that shows // the day the document is made from them). - let fixed = - get(a, "text:fixed").is_some_and(|v| v.trim() == "true") && (get(a, "text:date-value").is_some() || get(a, "text:time-value").is_some()); // A name a field code can hold as one word. let name = |k: &str| { get(a, k) @@ -112,7 +162,9 @@ pub(super) fn instr_of(local: &str, a: &Attrs, picture: impl Fn(&str) -> Option< _ => format!("REF {name} \\h"), }) } - _ if fixed => None, + // The sender's details (§7.3.6–7.3.7), from the application's user data: WordCraft's + // own `SENDER` field code, shown as its last result. + _ if local.strip_prefix("sender-").is_some_and(|p| SENDER_PARTS.contains(&p)) => local.strip_prefix("sender-").map(|p| format!("SENDER {p}")), _ => { let code = SIMPLE.iter().find(|(e, _)| *e == local).map(|(_, code)| code.to_string())?; // A date or time in its date style (§19.473 `style:data-style-name`). @@ -131,6 +183,10 @@ pub(super) fn element(instr: &str, result: &str, data_style: Option<&str>) -> Op let mut words = instr.split_whitespace(); let code = words.next()?.to_ascii_uppercase(); match code.as_str() { + "SENDER" => { + let part = words.next().filter(|p| SENDER_PARTS.contains(p))?; + Some(format!("{result}")) + } "SEQ" => { let seq = words.next().filter(|n| !n.starts_with('\\') && n.len() <= MAX_REF_NAME)?; let fmt = match switch_arg(instr, '*').as_deref() { diff --git a/crates/formats/src/odt/tests_more/fields.rs b/crates/formats/src/odt/tests_more/fields.rs index 1488efe28f..e29bdbdbdf 100644 --- a/crates/formats/src/odt/tests_more/fields.rs +++ b/crates/formats/src/odt/tests_more/fields.rs @@ -57,10 +57,29 @@ fn fields_open_as_fields_with_their_shown_text() { } #[test] -fn a_fixed_date_and_unknown_fields_are_plain_text() { +fn a_fixed_date_is_a_locked_field_and_unknown_fields_are_plain_text() { + // A fixed date (§19.807 `text:fixed`) keeps what it shows: a locked field, written back fixed. let d = import(&body(r#"1 May, 4, 5"#)).unwrap(); - assert!(fields(&d).is_empty()); - assert_eq!(d.body[0].as_para().unwrap().text, "1 May, 4, 5"); + assert_eq!(fields(&d), [("DATE".to_string(), "1 May".to_string())]); + let locked = d.body[0].as_para().unwrap().objects.iter().any(|o| matches!(o, InlineObject::Field { locked: true, .. })); + assert!(locked); + // Written back: with no picture to read its value under, as its text (a reader would show a + // fixed date without a value as today's). + let c = crate::odt::tests::content_of(&export(&d).unwrap()); + assert!(!c.contains(" :1 May 2026 14:30"# + ), + None, + )) + .unwrap(); + let c = crate::odt::tests::content_of(&export(&d).unwrap()); + assert!(c.contains(r#"text:date-value="2026-05-01""#) && c.contains(">1 May 2026"), "{c}"); + assert!(c.contains(r#"text:time-value="1899-12-30T14:30:00""#) && c.contains(">14:30"), "{c}"); + assert_eq!(c.matches(r#"text:fixed="true""#).count(), 2, "{c}"); // A fixed date with neither a value nor text (LibreOffice's templates) shows the day: a // date field. let d = import(&body(r#"."#)).unwrap(); @@ -320,3 +339,19 @@ fn user_fields_stay_user_fields() { let back = import(&saved).unwrap(); assert_eq!(back.custom_props, d.custom_props); } + +#[test] +fn sender_fields_stay_fields() { + // LibreOffice's letter and fax templates: the sender's details (§7.3.6), shown as last filled + // in (WordCraft's `SENDER` field code), written back as the same fields. + let d = import(&body(r#"Ada Lovelace, ada@example.org"#)).unwrap(); + assert_eq!( + fields(&d), + [("SENDER firstname".into(), "Ada".into()), ("SENDER lastname".into(), "Lovelace".into()), ("SENDER email".into(), "ada@example.org".into())] + ); + let c = crate::odt::tests::content_of(&export(&d).unwrap()); + assert!( + c.contains("Ada") && c.contains("ada@example.org"), + "{c}" + ); +} diff --git a/crates/formats/src/odt/writer.rs b/crates/formats/src/odt/writer.rs index 11a2c6b679..ad912c8a81 100644 --- a/crates/formats/src/odt/writer.rs +++ b/crates/formats/src/odt/writer.rs @@ -449,20 +449,23 @@ impl Writer { // A field around content: an index's is its element (see `index_at`). Inline::FieldStart(_) | Inline::FieldEnd => {} Inline::CommentEnd(id) => out.push_str(&format!("", annotation_name(self.prefix, *id))), - Inline::Field { instr, result, fmt } => match self.field_element(instr, result) { - Some(el) => { - match self.text_style(&Fmt { link: None, ..fmt.clone() }) { - Some(n) => out.push_str(&format!("{el}")), - None => out.push_str(&el), + Inline::Field { instr, result, fmt, locked } => { + match self.field_element(instr, result).and_then(|el| if *locked { super::fields::locked(&el, instr, result) } else { Some(el) }) + { + Some(el) => { + match self.text_style(&Fmt { link: None, ..fmt.clone() }) { + Some(n) => out.push_str(&format!("{el}")), + None => out.push_str(&el), + } + prev_space = false; + } + // No ODF field for it: what it shows, as text. + None => { + self.plain_inlines(&[Inline::Text(result.clone(), fmt.clone())], out); + prev_space = result.ends_with(' '); } - prev_space = false; } - // No ODF field for it: what it shows, as text. - None => { - self.plain_inlines(&[Inline::Text(result.clone(), fmt.clone())], out); - prev_space = result.ends_with(' '); - } - }, + } // Inside a tracked change: its base text, which the text path marks as changed. Inline::Ruby { base, fmt, .. } if fmt.ins.is_some() || fmt.del.is_some() => { self.plain_inlines(&[Inline::Text(base.clone(), fmt.clone())], out); diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md index 6e43fe3916..c52d2e80b4 100644 --- a/docs/file-format-parity.md +++ b/docs/file-format-parity.md @@ -1,6 +1,6 @@ # File-format parity with Microsoft Word -> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-11-03 · **Change:** trivial (ODT: table styles saved into their cells; ODT tables carry no Word table style; section column balance); previously trivial (ODT interpretation profile: the standard is law, what it leaves open (including unstated page margins) follows WordCraft, LibreOffice or custom settings); previously trivial (ODT form controls keep their place on the line and text areas their lines; custom shapes keep their geometry); previously trivial (ODT in-line frames placed against the text; in-line pictures saved standing on the baseline); previously trivial (ODT charts written back as they were while unchanged; frames' drawn outline; default header height); previously trivial (ODT header rows only where they repeat); previously trivial (ODT padding without a border; unequal columns; column breaks); previously trivial (ODT lines of only pictures laid out as LibreOffice does; default page without a layout); previously trivial (ODT pictures alone in a paragraph keep its size; in-line frames raised under an inherited paragraph relation); previously trivial (ODT tables fit the margins and keep their space above and below; header spacing kept); previously trivial (ODT frames anchored and placed by their style); previously trivial (ODT default font size saved; page-anchored frames placed from the page; text box paragraph styles kept; empty paragraphs keep their size); previously trivial (ODT default font size; locale-ordered dates); previously trivial (ODT page background pictures); previously trivial (ODT tables fixed layout; tables starting a page); previously trivial (emphasis marks: model, layout, DOCX `w:em`, ODT `style:text-emphasize`, `format.emphasisMark`); previously trivial (ODT variables as SET/REF fields; character styles keep what they turn off); previously trivial (ODT styles keep what they turn off; WMF/EMF pictures kept; pictures in text boxes shown by LibreOffice); previously trivial (ODT unstated page margins are LibreOffice's 2 cm; drawings outside a paragraph join the next one); previously trivial (ODT placeholders as content controls, template dates, user name fields, unsized pages, style-only templates, found with LibreOffice's own templates); previously trivial (ODT hidden form controls kept; `.ott` templates opened and saved); previously trivial (ODT fidelity re-estimated at ~90%; a kept form control made another kind is saved as that kind); previously trivial (ODT form control sizes and buttons kept); previously trivial (ODT turned text in cells and text boxes); previously trivial (ODT macros and unknown package parts kept); previously trivial (ODT table cell formulas as formula fields); previously trivial (ODT custom shapes drawn from their own geometry); previously trivial (ODT bibliography marks as citations of sources); previously trivial (ODT linked text boxes); previously trivial (ODT picture crops and contour wrapping); previously trivial (ODT fidelity re-estimated at ~85%); previously trivial (ODT custom document properties and user fields as DOCPROPERTY); previously trivial (ODT connectors read and written glued); previously trivial (ODT borders around text read and written); previously trivial (ODT index marks read and written as XE fields; an index held around its entries updates); previously trivial (ODT ruby read and written); previously trivial (ODT page breaks after a paragraph, kept lines, widow control, hyphenation, table alignment and width and row heights); previously trivial (in-line drawings raised or lowered by their run's position; ODT in-line frames keep their place on the baseline; leading's space after the last line; text box borders shown by LibreOffice); previously trivial (ODT form controls opened and saved as content controls); previously trivial (password-protected ODT opened and saved); previously trivial (ODT headers and footers keep their shapes, text boxes, charts and embedded objects on save); previously trivial (ODT embedded spreadsheets and OLE objects kept whole instead of lost; flat ODT sub-documents valid `office:document`s); previously trivial (ODT charts in drawing groups drawn on open); previously trivial (ODT charts opened and saved as editable charts; flat ODT sub-documents no longer end the body); previously trivial (ODT leading read as an at-least spacing); previously trivial (ODT tracked formatting changes; changed regions named by `xml:id`); previously trivial (ODT drop caps; tab stops no longer drop a paragraph's background); previously trivial (flat ODT `.fodt` opened and saved; ODT fidelity re-estimated at ~80%); previously trivial (ODT page settings; a footnote no longer takes a footer's text); previously trivial (ODT dates in their formats, sequences, chapters and references); previously trivial (ODT bookmarks over text); previously trivial (ODT tables of contents and indexes; ODT fidelity re-estimated); previously trivial (ODT polygons, polylines and paths); previously trivial (ODT arrowheads, dashes and gradients); previously trivial (ODT groups of shapes and pictures); previously trivial (ODT rotated and mirrored shapes and pictures); previously trivial (ODT drawing shapes read and written); previously trivial (ODT text box frames keep their line, fill, padding and fit); previously trivial (ODT Asian and complex-script fonts); previously trivial (ODT right-to-left paragraphs); previously trivial (ODT text boxes kept); previously trivial (ODT unnumbered headings detached from the outline); previously trivial (ODT contextual spacing and layout settings); previously trivial (ODT custom character styles kept); previously trivial (ODT list level positions); previously trivial (ODT custom paragraph styles kept); previously trivial (ODT equations written as formula objects); previously trivial (ODT numbered headings written as headings); previously trivial (ODT floating pictures); previously trivial (ODT paragraph borders and background); previously trivial (ODT heading numbering); previously trivial (ODT font-face names); previously trivial (ODT table cell borders and padding); previously trivial (ODT heading, title, quote and preformatted styles keep their look); previously trivial (ODT tab stops read and written); previously trivial (ODT character formatting read and written); previously trivial (ODT lists keep their number formats, bullets and identity); previously trivial (ODT comments read and written); previously trivial (ODT footnotes and endnotes read and written); previously trivial (ODT headers, footers and text fields written; fields read); previously trivial (ODT paragraph spacing, indents and line spacing read and written); previously trivial (a paragraph naming an undefined style is formatted as Normal, as in Word, #5077); previously trivial (a hyperlinked TOC writes its page numbers as `PAGEREF _Toc… \h` fields, as Word does, #5097); previously trivial (HTML import ends the empty comments and at once, #5040); previously trivial (chart and SmartArt text the font lacks is drawn in a fallback face, so Chinese labels no longer show boxes, #4720); previously trivial (bibliography sources keep a corporate author (`b:Corporate`): read, written, cited and listed whole, #4848); previously trivial (custom-property bookmark-link preservation, #4767); previously trivial (note conversion preserves content with an ordered reference/run walk, #4750); previously trivial (DOCX comment-ID save lookups); previously trivial (built-in heading styles have their outline level without `w:outlineLvl`, #4696); previously trivial (DOCX comment ranges inside footnotes and endnotes are kept on read, #4548); previously trivial (RTF import and export keep Windows and Enhanced Metafile pictures (`\wmetafile`, `\emfblip`), #4259); previously trivial (#4658 bounds nested Markdown reference-label work); previously trivial (HTML import keeps preformatted lines with CR or CRLF input newlines, #4810); previously trivial (DOCX parts stored under another casing keep their embedded fonts through a save, and a private save of a kept glossary escapes the attribute values it rewrites; previously trivial: the `.doc` reader logs what its copy budget leaves out, once a kind per document; importers bound hostile expansion: font names, links, ODS repeats, LaTeX wrappers, Markdown delimiters, #3692/#3713; previously trivial: repeated DOCX style IDs: save/reopen regression; previously trivial: Markdown code spans keep line-broken text literal, #3738; previously trivial: Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`); previously trivial: localized TOC style ids read as the TOC styles, and a TOC in columns keeps its layout through Update Table, #3889; previously trivial: cu20we: outline caps; previously trivial: a relationship the markup names without the prefix is read as it wrote: an unqualified `id` on an element that carries a relationship names that relationship, and the writer keeps the attribute with the id the new package holds the part under; an ordinary `id` — a VML shape's, a drawing's — names no part; previously trivial: the reader takes the relationship ids the markup refers to from the relationship attributes of the main document it has already parsed, so a document with many relationships opens in the time its part takes, #3411; previously trivial: a table cell span from a `.json` file stays within 63 columns through Insert Column and Merge Cells, #3637; previously trivial: the file commands that change the document are checked on a protected document, the protection of a protected document needs an explicit stop, the session author can't change through `file.setAuthor` under protection (the CLI's `--author` uses the same protection check), and the post-check compares the settings and the metadata; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: `majorBidi`/`minorBidi` theme fonts follow the settings' theme font language, as measured in Word; previously trivial: Word signature lines are kept on save, still signable; previously trivial: Times New Roman keeps Liberation Serif under the roman-font rule; previously trivial: shape gradients and transparency, #1500; previously trivial: a folder that keeps no Unix modes, such as a NAS share mounted by GVFS, still takes a save, #3003; previously trivial: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: table style band sizes written, a style without them unbanded as in Word, #3415; previously trivial: HTML export writes ruby (furigana, phonetic guides) and HTML import reads it back, #1681; previously trivial: RTF import decodes the East Asian multibyte code pages, #1653; previously trivial: PDF export: lam-alef drawn as two glyphs at one x extracts in reading order, #2310; previously trivial: native .json stores pictures and kept parts as base64, #586 follow-up; previously trivial: ODT headers and footers read from each master page, #863; previously trivial: RTF import compares heading and code formatting with the file's stylesheet; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: Word XML and web pages saved as `.doc` open by what they hold, #2853; previously trivial: a VML shape in a header cell is always placed on the page, user-checked in Word for Mac, #1775; previously trivial: `w:sym` characters keep their symbol font when the text's font changes and are written back as `w:sym`, #2036; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: two lines in one and horizontal in vertical (`w:eastAsianLayout`) kept on save; previously trivial: PDF outline targets follow leading page breaks; previously trivial: positional tabs `w:ptab` read and kept on save, #2367; previously trivial: DOCX: mixed right-to-left runs split and marked `w:rtl` with their language, #1543; previously trivial: `w:doNotTrackMoves` round-trips and turns move tracking off; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: DOCX glossary documents (building blocks) read, kept and written; previously trivial: cached field results keep their visible run formatting; previously trivial: cached REF results retain hyperlink destinations; previously trivial: CLI conversions can explicitly refresh fields; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: a pasted HTML `
` is an indented paragraph, not the Quote style, #1270); previously trivial: every table style part round-trips, #714; previously trivial: VML freeforms read and kept on save; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: `flowChartOr` draws its circle and cross spokes, as in Word; previously trivial: RTF: Mac OS Roman and DOS text, #1653; previously trivial: VML text boxes keep their internal margins, fit to their text and vertical alignment; hidden drawings not shown; previously trivial: PDF export draws horizontal and vertical lines inside groups, #1474; previously trivial: symbol-font text exported as Unicode, #776; previously trivial: text-box margins, Resize shape to fit text and freeforms in groups, #743; previously trivial: formatted paste from the system clipboard's HTML and RTF, #687; previously trivial: independent complex-script formatting inheritance and round-trip regression tests; previously trivial: import/export fixes for TXT, RTF, ODT, HTML and LaTeX, #433–#440; previously major: first version; every format Word reads or writes, measured from the readers and writers on origin/main) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4, plus Word for Windows' extra formats +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-11-03 · **Change:** trivial (ODT fixed and sender fields); previously trivial (ODT: table styles saved into their cells; ODT tables carry no Word table style; section column balance); previously trivial (ODT interpretation profile: the standard is law, what it leaves open (including unstated page margins) follows WordCraft, LibreOffice or custom settings); previously trivial (ODT form controls keep their place on the line and text areas their lines; custom shapes keep their geometry); previously trivial (ODT in-line frames placed against the text; in-line pictures saved standing on the baseline); previously trivial (ODT charts written back as they were while unchanged; frames' drawn outline; default header height); previously trivial (ODT header rows only where they repeat); previously trivial (ODT padding without a border; unequal columns; column breaks); previously trivial (ODT lines of only pictures laid out as LibreOffice does; default page without a layout); previously trivial (ODT pictures alone in a paragraph keep its size; in-line frames raised under an inherited paragraph relation); previously trivial (ODT tables fit the margins and keep their space above and below; header spacing kept); previously trivial (ODT frames anchored and placed by their style); previously trivial (ODT default font size saved; page-anchored frames placed from the page; text box paragraph styles kept; empty paragraphs keep their size); previously trivial (ODT default font size; locale-ordered dates); previously trivial (ODT page background pictures); previously trivial (ODT tables fixed layout; tables starting a page); previously trivial (emphasis marks: model, layout, DOCX `w:em`, ODT `style:text-emphasize`, `format.emphasisMark`); previously trivial (ODT variables as SET/REF fields; character styles keep what they turn off); previously trivial (ODT styles keep what they turn off; WMF/EMF pictures kept; pictures in text boxes shown by LibreOffice); previously trivial (ODT unstated page margins are LibreOffice's 2 cm; drawings outside a paragraph join the next one); previously trivial (ODT placeholders as content controls, template dates, user name fields, unsized pages, style-only templates, found with LibreOffice's own templates); previously trivial (ODT hidden form controls kept; `.ott` templates opened and saved); previously trivial (ODT fidelity re-estimated at ~90%; a kept form control made another kind is saved as that kind); previously trivial (ODT form control sizes and buttons kept); previously trivial (ODT turned text in cells and text boxes); previously trivial (ODT macros and unknown package parts kept); previously trivial (ODT table cell formulas as formula fields); previously trivial (ODT custom shapes drawn from their own geometry); previously trivial (ODT bibliography marks as citations of sources); previously trivial (ODT linked text boxes); previously trivial (ODT picture crops and contour wrapping); previously trivial (ODT fidelity re-estimated at ~85%); previously trivial (ODT custom document properties and user fields as DOCPROPERTY); previously trivial (ODT connectors read and written glued); previously trivial (ODT borders around text read and written); previously trivial (ODT index marks read and written as XE fields; an index held around its entries updates); previously trivial (ODT ruby read and written); previously trivial (ODT page breaks after a paragraph, kept lines, widow control, hyphenation, table alignment and width and row heights); previously trivial (in-line drawings raised or lowered by their run's position; ODT in-line frames keep their place on the baseline; leading's space after the last line; text box borders shown by LibreOffice); previously trivial (ODT form controls opened and saved as content controls); previously trivial (password-protected ODT opened and saved); previously trivial (ODT headers and footers keep their shapes, text boxes, charts and embedded objects on save); previously trivial (ODT embedded spreadsheets and OLE objects kept whole instead of lost; flat ODT sub-documents valid `office:document`s); previously trivial (ODT charts in drawing groups drawn on open); previously trivial (ODT charts opened and saved as editable charts; flat ODT sub-documents no longer end the body); previously trivial (ODT leading read as an at-least spacing); previously trivial (ODT tracked formatting changes; changed regions named by `xml:id`); previously trivial (ODT drop caps; tab stops no longer drop a paragraph's background); previously trivial (flat ODT `.fodt` opened and saved; ODT fidelity re-estimated at ~80%); previously trivial (ODT page settings; a footnote no longer takes a footer's text); previously trivial (ODT dates in their formats, sequences, chapters and references); previously trivial (ODT bookmarks over text); previously trivial (ODT tables of contents and indexes; ODT fidelity re-estimated); previously trivial (ODT polygons, polylines and paths); previously trivial (ODT arrowheads, dashes and gradients); previously trivial (ODT groups of shapes and pictures); previously trivial (ODT rotated and mirrored shapes and pictures); previously trivial (ODT drawing shapes read and written); previously trivial (ODT text box frames keep their line, fill, padding and fit); previously trivial (ODT Asian and complex-script fonts); previously trivial (ODT right-to-left paragraphs); previously trivial (ODT text boxes kept); previously trivial (ODT unnumbered headings detached from the outline); previously trivial (ODT contextual spacing and layout settings); previously trivial (ODT custom character styles kept); previously trivial (ODT list level positions); previously trivial (ODT custom paragraph styles kept); previously trivial (ODT equations written as formula objects); previously trivial (ODT numbered headings written as headings); previously trivial (ODT floating pictures); previously trivial (ODT paragraph borders and background); previously trivial (ODT heading numbering); previously trivial (ODT font-face names); previously trivial (ODT table cell borders and padding); previously trivial (ODT heading, title, quote and preformatted styles keep their look); previously trivial (ODT tab stops read and written); previously trivial (ODT character formatting read and written); previously trivial (ODT lists keep their number formats, bullets and identity); previously trivial (ODT comments read and written); previously trivial (ODT footnotes and endnotes read and written); previously trivial (ODT headers, footers and text fields written; fields read); previously trivial (ODT paragraph spacing, indents and line spacing read and written); previously trivial (a paragraph naming an undefined style is formatted as Normal, as in Word, #5077); previously trivial (a hyperlinked TOC writes its page numbers as `PAGEREF _Toc… \h` fields, as Word does, #5097); previously trivial (HTML import ends the empty comments and at once, #5040); previously trivial (chart and SmartArt text the font lacks is drawn in a fallback face, so Chinese labels no longer show boxes, #4720); previously trivial (bibliography sources keep a corporate author (`b:Corporate`): read, written, cited and listed whole, #4848); previously trivial (custom-property bookmark-link preservation, #4767); previously trivial (note conversion preserves content with an ordered reference/run walk, #4750); previously trivial (DOCX comment-ID save lookups); previously trivial (built-in heading styles have their outline level without `w:outlineLvl`, #4696); previously trivial (DOCX comment ranges inside footnotes and endnotes are kept on read, #4548); previously trivial (RTF import and export keep Windows and Enhanced Metafile pictures (`\wmetafile`, `\emfblip`), #4259); previously trivial (#4658 bounds nested Markdown reference-label work); previously trivial (HTML import keeps preformatted lines with CR or CRLF input newlines, #4810); previously trivial (DOCX parts stored under another casing keep their embedded fonts through a save, and a private save of a kept glossary escapes the attribute values it rewrites; previously trivial: the `.doc` reader logs what its copy budget leaves out, once a kind per document; importers bound hostile expansion: font names, links, ODS repeats, LaTeX wrappers, Markdown delimiters, #3692/#3713; previously trivial: repeated DOCX style IDs: save/reopen regression; previously trivial: Markdown code spans keep line-broken text literal, #3738; previously trivial: Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`); previously trivial: localized TOC style ids read as the TOC styles, and a TOC in columns keeps its layout through Update Table, #3889; previously trivial: cu20we: outline caps; previously trivial: a relationship the markup names without the prefix is read as it wrote: an unqualified `id` on an element that carries a relationship names that relationship, and the writer keeps the attribute with the id the new package holds the part under; an ordinary `id` — a VML shape's, a drawing's — names no part; previously trivial: the reader takes the relationship ids the markup refers to from the relationship attributes of the main document it has already parsed, so a document with many relationships opens in the time its part takes, #3411; previously trivial: a table cell span from a `.json` file stays within 63 columns through Insert Column and Merge Cells, #3637; previously trivial: the file commands that change the document are checked on a protected document, the protection of a protected document needs an explicit stop, the session author can't change through `file.setAuthor` under protection (the CLI's `--author` uses the same protection check), and the post-check compares the settings and the metadata; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: `majorBidi`/`minorBidi` theme fonts follow the settings' theme font language, as measured in Word; previously trivial: Word signature lines are kept on save, still signable; previously trivial: Times New Roman keeps Liberation Serif under the roman-font rule; previously trivial: shape gradients and transparency, #1500; previously trivial: a folder that keeps no Unix modes, such as a NAS share mounted by GVFS, still takes a save, #3003; previously trivial: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: table style band sizes written, a style without them unbanded as in Word, #3415; previously trivial: HTML export writes ruby (furigana, phonetic guides) and HTML import reads it back, #1681; previously trivial: RTF import decodes the East Asian multibyte code pages, #1653; previously trivial: PDF export: lam-alef drawn as two glyphs at one x extracts in reading order, #2310; previously trivial: native .json stores pictures and kept parts as base64, #586 follow-up; previously trivial: ODT headers and footers read from each master page, #863; previously trivial: RTF import compares heading and code formatting with the file's stylesheet; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: Word XML and web pages saved as `.doc` open by what they hold, #2853; previously trivial: a VML shape in a header cell is always placed on the page, user-checked in Word for Mac, #1775; previously trivial: `w:sym` characters keep their symbol font when the text's font changes and are written back as `w:sym`, #2036; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: two lines in one and horizontal in vertical (`w:eastAsianLayout`) kept on save; previously trivial: PDF outline targets follow leading page breaks; previously trivial: positional tabs `w:ptab` read and kept on save, #2367; previously trivial: DOCX: mixed right-to-left runs split and marked `w:rtl` with their language, #1543; previously trivial: `w:doNotTrackMoves` round-trips and turns move tracking off; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: DOCX glossary documents (building blocks) read, kept and written; previously trivial: cached field results keep their visible run formatting; previously trivial: cached REF results retain hyperlink destinations; previously trivial: CLI conversions can explicitly refresh fields; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: a pasted HTML `
` is an indented paragraph, not the Quote style, #1270); previously trivial: every table style part round-trips, #714; previously trivial: VML freeforms read and kept on save; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: `flowChartOr` draws its circle and cross spokes, as in Word; previously trivial: RTF: Mac OS Roman and DOS text, #1653; previously trivial: VML text boxes keep their internal margins, fit to their text and vertical alignment; hidden drawings not shown; previously trivial: PDF export draws horizontal and vertical lines inside groups, #1474; previously trivial: symbol-font text exported as Unicode, #776; previously trivial: text-box margins, Resize shape to fit text and freeforms in groups, #743; previously trivial: formatted paste from the system clipboard's HTML and RTF, #687; previously trivial: independent complex-script formatting inheritance and round-trip regression tests; previously trivial: import/export fixes for TXT, RTF, ODT, HTML and LaTeX, #433–#440; previously major: first version; every format Word reads or writes, measured from the readers and writers on origin/main) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4, plus Word for Windows' extra formats Every format Word opens or saves, what WordCraft does with it, and how it's tested. Fidelity is the share of a typical real-world file's content and formatting that survives (read: shows correctly; @@ -285,6 +285,7 @@ Custom document properties retain their bookmark link targets through DOCX saves | 2026-11-02 | trivial | ODT: a chart lost the look WordCraft doesn't model (its fonts and sizes, axis and grid lines) on save, written anew from WordCraft's chart. The chart object as read is kept (through drawing it again when it opens or is resized), and written back whole while the chart reads the same; an edited chart is written from WordCraft's chart as before. The chart documents round-trip pixel-identical (`charts::an_unchanged_chart_is_written_back_as_it_was_and_an_edited_one_anew`, `engine::tests::redrawing_a_chart_keeps_the_chart_as_read`). Found with LibreOffice's serif business letter: a text frame outlined by its drawn stroke (`draw:stroke`, no `fo:border`) lost its outline; it's the frame's line. A header or footer whose style states no height (or that has none) was 0 tall; it's LibreOffice's 0.5 cm (measured), so the text no longer moves up. The letter round-trips to 116 differing pixels (from 4,223) (`text_boxes::a_frames_drawn_stroke_is_its_line_when_it_has_no_border`, `headers::a_header_without_a_stated_height_is_half_a_centimetre`) | | 2026-11-02 | trivial | ODT, found with LibreOffice's agendas: saving wrote every table's first row as a header row (`table:table-header-rows`), repeated at the top of each page, because a table style's header row (on by default in Word's table look) was taken for Repeat as header row; a table crossing a page showed its first row twice. Only rows set to repeat are written so. The agendas round-trip to about 145 differing pixels (from 5,269 and 5,086), their text the same (`tables::only_rows_set_to_repeat_are_written_as_header_rows`) | | 2026-11-02 | trivial | ODT, found with LibreOffice's report templates and one-page résumé. A paragraph's padding on a side without a border (measured: LibreOffice gives it room) was dropped; it's kept, laid out (see layout-parity) and written back. Unequal columns (`style:column` `style:rel-width` and indents, on pages and sections) were made equal; they keep their widths, written back as shares, without the gap LibreOffice ignores them beside. Columns with no stated gap have none (it had been Word's 0.5 in). A paragraph starting a column (`fo:break-before="column"`) didn't; it starts with Word's column break, written back on the paragraph. The report templates round-trip to 0–11 differing pixels (from 9,600), the résumé to 24 (from 6,286) (`para_borders::padding_without_a_border_keeps_its_room`, `odt::tests::unequal_columns_keep_their_widths_and_columns_without_a_gap_have_none`, `odt::tests::a_paragraph_starting_a_column_starts_with_a_column_break`) | +| 2026-11-03 | trivial | ODT fixed fields (§19.807 `text:fixed`) open as locked fields and are written back fixed, a date or time with the value its text shows under its picture (`text:date-value`, `text:time-value`, which LibreOffice needs to keep it); one whose text can't be read back is written as its text. Sender fields (§7.3.6 `text:sender-*`) open as `SENDER` fields and are written back as themselves. | | 2026-11-03 | trivial | ODT user fields (§7.4.7 `text:user-field-decl`, §7.4.9 `text:user-field-get`; LibreOffice's report templates) are written back as user fields, with their declared values in the content, instead of as document properties (`CustomProp::odf_user_field`). | | 2026-11-03 | trivial | ODT, found by a loss check that compares what a file uses with what WordCraft writes back: each font is now declared (`office:font-face-decls`, §16.21: family, generic family, pitch) and named where used (`style:font-name`), so a reader without it picks a like one; who changed the document last, when, and how often it was saved (`dc:creator`, `dc:date`, `meta:editing-cycles`) are read into and written from the document's properties. | | 2026-11-03 | trivial | ODT, found with Google Docs' and ONLYOFFICE's files (now in the corpus): a heading's look comes from its style and its outline level from its element, so a `text:h` without `text:outline-level` (level 1, §19.850.4) in a style based on Heading 2 looks as Heading 2, as LibreOffice draws it, and stays level 1 (it became Heading 1). Widow and orphan control is stated in the default paragraph style (`fo:widows`/`fo:orphans` 2) when Normal has it, since LibreOffice reads none unsaid as off. Google's 2011 Fundamentals export now round-trips with its 88 pages and text (1.27M → 139k differing pixels). |