21. Office Open XML and OpenDocument Viewing
Office Open XML and OpenDocument Viewing requirements from the authoritative Glitchpad Technical Specification.
DOCX support activates in v0.4.0. Mammoth converts Word semantics to a renderer-neutral HTML tree, which passes through the shared sanitizer. Supported content includes headings, paragraphs, lists, tables, hyperlinks, footnotes/endnotes, inline images, basic emphasis, and core document properties. The renderer provides heading navigation, search, copy, and metadata.
ODT support activates in v0.5.0. A bounded Rust parser reads the OASIS OpenDocument 1.4 package structure with zip and quick-xml, validates required package entries, and emits the same semantic document tree used by the office presentation layer. Supported content includes headings, paragraphs, lists, tables, hyperlinks, notes, inline images, basic text styles, and document metadata.
The fidelity promise for both formats is semantic readability. Pagination, exact font substitution, line wrapping, floating-object placement, tracked changes, comments workflows, fields, formulas, charts, macros, scripts, embedded executables, external resources, and editing are not promised. Unsupported constructs produce a per-document report rather than disappearing silently.
Office containers are limited to 128 MiB compressed input, 10,000 entries, 512 MiB expanded desktop or 256 MiB Android, 100:1 aggregate expansion, 20 nested relationship traversals, and normalized internal paths with traversal rejection. Encrypted packages are reported as unsupported in their first renderer releases.