Skip to content

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 05:54
· 1223 commits to main since this release

Highlights

The complete stable Word family publishes the M23 from-scratch business
document boundary at 0.14.0. You can now author complete business documents
from a blank package in Rust, including tables, rich headers and footers,
drawings, text boxes, watermarks, styles, numbering, and page-accurate fields.
This release also brings every Word fix reported and contributed since 0.13.1
to crates.io, together with prebuilt rdocx CLI binaries.

Added

  • Create Word-compatible DOCX, DOCM, DOTX, and DOTM packages with complete
    settings, properties, themes, font tables, embedded fonts, style graphs, and
    numbering definitions.
  • Edit ordered sections, page geometry, rich per-section headers and footers,
    story text in every container, and generic content through transactional
    insert, move, clone, remove, and cross-document fragment import operations.
  • Author complete tables, rows, and cells, ordered run content, rich HTML
    fragments in any story, pictures with crop and floating placement, text
    boxes, and section-aware watermarks. Measure paragraphs and tables at a
    caller width for equal-height layouts.
  • update_layout_backed_fields and update_page_fields write PAGE, NUMPAGES,
    PAGEREF, and TOC caches from one deterministic layout, as proposed in
    Issue 93 and
    PR 114.
  • Clone and remove table rows
    (Issue 95,
    PR 113), replace an existing
    picture atomically
    (Issue 96,
    PR 107), split runs at Unicode
    character offsets
    (Issue 97,
    PR 112), and control
    w:updateFields
    (Issue 98,
    PR 104).
  • Insert pictures into any story with insert_picture_to_story and anchor
    comments inside table cells with add_story_comment, from
    Issue 121. Native content
    index lookup, paragraph search, named highlight, shading, and style helpers
    back the Python round-two surface from
    Issue 94 and PRs
    108,
    109,
    110, and
    111.
  • Story items report their direct main-body owner
    (Issue 86), TOC rebuilding
    returns ordered diagnostics, and comments accept optional RFC 3339 dates
    (Issue 117).
  • rdocx-cli gains schema-versioned comment, revision, comparison, TOC,
    structured text, layout, and guarded replacement commands from
    Issue 76. Rust release tags
    attach checksummed CLI archives for six targets that cargo binstall rdocx-cli resolves, as requested in
    Issue 100.

Fixed

  • Documents with drawing ids reused across parts open
    (Issue 72), unused root
    default namespaces save safely
    (Issue 73), and generated PDFs
    keep logical reading order
    (Issue 74).
  • Document comparison preserves drawings
    (Issue 75), paragraphs with
    complex fields
    (Issue 85,
    PR 106), and two or more
    appended paragraphs
    (Issue 115).
  • Explicit false table toggles stay false
    (Issue 83,
    PR 101), content-control type
    payloads survive save
    (Issue 84,
    PR 103), and fractional line
    spacing values are accepted
    (PR 122).
  • Word PNG output premultiplies straight-alpha pictures before compositing
    (Issue 119).
  • Run-level page breaks start a new page
    (Issue 88,
    PR 102), and header and footer
    pictures render from their own story part
    (Issue 89,
    PR 102).
  • TOC rebuilding accepts Word's default \z switch
    (Issue 90,
    PR 101) and writes entries with
    localized styles, section-derived tab stops, and structural numbering tabs
    (Issue 116).
  • Comment content types, identities, thread links, and dates survive save and
    reopen (Issue 117), and story
    reads are linear and include tracked insertions and inline content controls
    (Issue 118).
  • Note-only edits keep paragraph cache reuse, and restart checkpoints survive
    body-length changes, restoring the editing performance reported in
    Issue 69.
  • Authored Word charts are portable across Word and Pages
    (PR 71,
    PR 123), and reader and
    serializer behavior incorporates hardened equivalents of
    PR 77,
    PR 78,
    PR 79, and
    PR 80.

Compatibility

The exact seven-package stable crates.io family moves together from 0.13.1 to
0.14.0. The selected set is rdocx-opc, rdocx-oxml, rdocx-layout,
rdocx-html, rdocx-pdf, rdocx, and rdocx-cli. It depends on the
separately published shared OOXML 0.12.1 family. This release also satisfies
the crates.io publication request in
Issue 99. The unpublished 0.13.2
crates.io train is superseded rather than backfilled.

This pre-1.0 minor release contains source-incompatible Rust changes, including
the following.

  • TocRebuildReport replaces diagnostic_count with ordered diagnostics and
    is no longer Copy. Read diagnostics.len() for the count.
  • ParagraphItemRef::CommentRangeStart and CommentRangeEnd are struct
    variants, and BookmarkStart and BookmarkEnd gained has_child_content.
    Update patterns that match these variants.
  • ListLevel is no longer Copy or Eq and now has private fields, so
    ListLevel { format, start: Some(n) } literals become
    ListLevel::new(format).start(n).
    ListNumberFormat is no longer Copy and now has 61 variants, so exhaustive
    matches must handle the new formats.
  • rdocx::Error gained a Story variant, and exhaustive matches must handle
    it.
  • ChartData and several rdocx-oxml CT_* model structs gained public
    fields, so full struct literals must add them. CT_Anchor::from_xml and
    CT_Inline::from_xml now take a namespace-aware NsReader.

rdocx replace now stages its result
and refuses an output path that already exists, including the input file. It
also checks an exact expected match count before publishing when one is given.
Scripts that replaced a document in place must write to a new output path.
Python, WASM, npm, and PyPI publication authority is unchanged, and
rdocx-wasm@0.14.0 is not a crates.io package.

Contributors

@hadim reported the real-document failures and
requests in Issues 72,
73,
74,
75,
76,
83,
84,
85,
86,
88,
89,
90,
93,
95,
96,
97,
98,
99,
100,
115,
116,
117,
118,
119, and
121, and requested the Python
editing surface those native helpers support in
Issue 94.
They contributed the implementations reconciled from PRs
101,
102,
103,
104,
106,
107,
108,
109,
110,
111,
112,
113, and
114.
@pedroassumpcao contributed the reader and
serializer contracts in PRs 77,
78,
79, and
80, and fractional line spacing in
PR 122.
@chevinbrown contributed portable authored
Word charts in PR 71 and the
line-chart viewer defaults in PR 123.
@emptinessform diagnosed and measured the
note-edit and restart performance regression in
Issue 69. Atul Sharma
integrated, hardened, and released the family.