Skip to content

v0.16.1

Choose a tag to compare

@github-actions github-actions released this 15 Oct 12:15
· 329 commits to main since this release

Highlights

Word gains fuller Python authoring, safe checked XML owners, richer one-shot CLI operations and public HTML/Markdown import. The Rust crates, CLI and Python distribution share version 0.16.1.

Added

  • Python exposes complete run, paragraph, list, style, table, picture, internal-link, section, furniture, note and document operations through checked native providers. Physical owners and related package parts retain their source identities.
  • Document.from_html and Document.from_markdown expose the supported import subsets, preserve semantic mark/code content and report unsupported input through diagnostics.
  • The CLI adds ordered replacement maps, checked fields, physical image extraction, metadata, tag filling, and accepted-body inspection. Python can create Word charts.
  • Checked paragraph, run, table, cell and section XML operations preserve opaque bytes, validate resource and relationship boundaries, and publish atomically. Licensed embedded font listing, removal and settings are available through native, Python and CLI surfaces.
  • The unchanged 100-script compatibility corpus qualifies 95 correct files, with all 24 documentation cases and required XML, lifetime, native and rendering checks qualified. Five explicit divergences retain their documented boundaries.

Fixed

  • Nested HTML mark highlights survive rich inline parsing. Picture-only paragraphs no longer produce false empty-content diagnostics, and native accessibility follows visible accepted content.
  • Scoped text-box replacements synchronize supported alternate copies. Table empty margins, signed indentation, physical picture ownership and source formatting survive save/reopen.
  • Markdown export retains emphasis whitespace and table/list boundaries. New compatible documents explicitly name compatibility mode15. TOC rebuild preserves entry boundary paragraphs, and story ranges avoid repeated whole-source scans while valid empty comment owners remain accepted.
  • Caller fonts reach supported render/export paths, variable defaults are respected, and deterministic metric-compatible bundled faces and qualified bullet fallbacks have explicit source/glyph evidence.

Compatibility

Font.color exposes a live ColorFormat rather than the preceding scalar return. Use font.color.rgb or theme_color and preserve the distinct auto value where supported. Follow checked owner errors instead of reusing retired descendants or refetching them implicitly. Public Rust layout/model additions require updating exhaustive literals and matches according to the final accepted API inventory.

DrawingML text watermark opacity is restricted to0.5 with atomic refusal for other values. Existing VML support retains its full range. Native Word currently uses the approved one-font-per-name interoperability boundary, even though the API and own renderer retain four-face selection. Word multi-face interoperability, full-range watermark interoperability, bibliography catalogue parity, navigation and standalone authoring remain S92 work and are excluded from these release claims.

Contributors

  • @Serkaine supplied authenticated reports and reference contributions for these outcomes. Contribution slices are selectively adapted or delivered through reviewed hardened equivalents, rather than claiming every stacked PR merged unchanged.
    • Issue 332, Markdown export puts spaces inside emphasis markers and joins a table to the list before it.
    • Issue 334, New documents name no compatibility mode, so Word opens them in Compatibility Mode.
  • @hadim supplied authenticated reports and reference contributions for these outcomes. Contribution slices are selectively adapted or delivered through reviewed hardened equivalents, rather than claiming every stacked PR merged unchanged.
    • Issue 296, Caller fonts reach only the rdocx PDF: no --font-dir for rdocx images, nor anywhere in rpptx (convert --to png ignores it silently).
    • Issue 297, A variable font from --font-dir renders bold runs with regular glyphs under a -Bold name.
    • Issue 298, rdocx validate counts a paragraph holding only a picture as an empty paragraph.
    • Issue 299, Python colours: RGBColor here, hex string there, and font.color.rgb (python-docx / python-pptx) fails in both bindings.
    • Issue 300, rdocx Python: expose the table indent (w:tblInd), negative values included.
    • Issue 301, replace_text_at on a text box edits the DrawingML copy only, the VML fallback keeps the old text.
    • Issue 303, rdocx Python: run, paragraph, style and list formatting parity with the Rust API.
    • Issue 304, rdocx: headers, footers, footnotes and page setup from Python, and two section bugs.
    • Issue 305, rdocx: tables, pictures and links: Python parity, table column editing and cell split.
    • Issue 306, rdocx Python: document-level features the CLI or Rust already have (export, templates, properties, validate).
    • Issue 307, rdocx and rpptx CLI: the missing one-shot commands (batch replace, fields, images, metadata, slides, notes, fit).
    • Issue 313, Fonts in rdocx and rpptx: caller fonts everywhere, variable fonts, more metric-compatible faces.
    • Issue 314, Everyday coverage: Python and CLI parity for docx and pptx (Google Docs / Google Slides scope).
    • Issue 316, rdocx and rpptx Python: first-draft script success, raw XML access, stable handles, no silent failures.
    • Issue 321, rdocx layout: numbering instances of one definition should share their counters, as in Word.
    • Issue 331, rdocx: deeply nested inline content controls crash the parser (stack overflow).
    • Issue 337, rdocx: nested text boxes take exponential time and overflow the stack.
    • Issue 339, rdocx: a tab is dropped from StoryItem.text and from the header, footer and JSON text views.
    • Issue 340, rdocx: rebuild_toc adds an empty paragraph above the first entry and below the last.
    • Issue 345, rdocx and rpptx Python: add_chart.
    • Issue 350, rdocx: create a document from HTML in Python and the CLI.
    • Issue 351, rdocx: create a document from Markdown.
    • Issue 360, Font embedding: expose rdocx embed_font in Python and the CLI, add it to rpptx.
    • Issue 362, rebuild_toc, update_page_fields and comments became quadratic in v0.16.0.
    • PR 315, Pass caller fonts to every render and draw variable fonts at the requested weight.
    • PR 317, Python binding gaps (cell text frames, one colour rule, table indent) and validate / text box replacement fixes.
    • PR 319, Bundle Gelasio and Selawik, draw Symbol and Wingdings bullets and report the Aptos fallback.
    • PR 320, Expose rdocx run, paragraph, style and list formatting in Python.
    • PR 322, Edit rdocx table columns, split cells, and give Python pictures and internal links their everyday options.
    • PR 325, Share rdocx text, export and validation with the CLI and expose document-level features in Python.
    • PR 328, Write rdocx headers, footers, notes and page setup from Python, and fix new-section geometry and even footers.
    • PR 330, Add batch replace, fields, images, metadata, fill, slide, notes and fit commands to the CLIs (stacked on #325).
    • PR 333, Measure first-draft scripts, add raw XML access, keep rdocx handles stable and refuse silent failures.
    • PR 336, Bound nested content controls when reading, and share list counters across numbering instances.
    • PR 338, Read nested text boxes once and bound their nesting.
    • PR 341, Keep TOC field markers in the first and last rebuilt entries, and rebuild one-paragraph TOCs.
    • PR 342, Read run tabs, breaks and field instructions in story text as Paragraph.text does.
    • PR 343, Embed an image from a header, footer or note part, so a header run can hold a picture.
    • PR 354, Name compatibility mode 15 in new documents and write Markdown that CommonMark reads as intended.
    • PR 356, Add charts from Python, and read and replace the data of an existing chart.
    • PR 359, Create a document from HTML in Python and the CLI, and from Markdown.
    • PR 361, Embed fonts in rdocx from Python and the CLI, and in rpptx everywhere.
    • PR 363, Read each story source once when listing range paragraphs.
  • @pedroassumpcao supplied authenticated reports and reference contributions for these outcomes. Contribution slices are selectively adapted or delivered through reviewed hardened equivalents, rather than claiming every stacked PR merged unchanged.
    • PR 294, Preserve mark highlights on nested inline runs.
    • PR 302, Model self-closing empty table cell margins.