All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improve DOCX reading and writing performance by reducing XML allocations, avoiding repeated ZIP lookups, and deduplicating embedded images without cloning their full buffers. Existing tables of contents are no longer deeply cloned during package preparation, and automatic TOC expansion reuses the document tree allocation without allocating style IDs per paragraph.
- Add
Docx::packto stream XML package parts directly into a DOCX archive. This avoids retaining every rendered XML part in memory and is faster than callingDocx::buildfollowed byXMLDocx::pack. - Use the streaming package path in
docx-wasm, optimize release WASM with one codegen unit and an explicitwasm-opt -O, and avoid rebuilding the same WASM package repeatedly in CI. - Add
ReadDocxOptions::with_image_previews(false)for callers that want to preserve original image data without generating decoded previews. - Fix paragraph ID normalization when generated IDs collide, and ensure automatically generated table-of-contents content is normalized before dependency collection.
- Fix images inside footer structured data tags using header relationship IDs.
- Deduplicate identical media across the document, header, and footer parts while preserving each part's image relationships. Images and footnotes in nested sections, structured data tags, tables, and tracked content are now collected through one shared document-tree traversal.
- Support paragraph borders in the reader.
- Support theme colors on
<w:color>: newThemeColorenum andtheme_color/theme_shade/theme_tintbuilders onColor,RunProperty,Run, andStyle. Emitsw:themeColor/w:themeShade/w:themeTint(with thew:valhex kept as a fallback) and reads them back, so generated documents adapt when the Word theme changes. - Convert embedded EMF images to SVG in docx-wasm via the
emf-corecrate. EMF entries are surfaced through the existingDocx.imagesfield; the original bytes are preserved and docx-wasm fills the preview slot with SVG instead of PNG. The publisheddocx-rscrate does not depend on the unpublished EMF conversion crates. - Added
Style::shadingandParagraph::set_bordersdelegating builders (fork).
- Support
fitText - Support
qFormat/uiPriority/semiHidden/unhideWhenUsed - Support
off
- Make compatible with the rust edition 2021 (#838)
- Support
Section. - fix: emit paragraph sectPr and update snapshots (#862)
- Include LICENSE file for final crate (#863)
- Support
TC - Support
dstrike - Update Add after for default toc styles #806
- Update
Levelstyles. - Support
titlePg - Support AbstractNumbering <w:multiLevelType w:val="multilevel"/>
- Support
capsin wasm.
- Floating images cause docx generation to fail with error
should end: LastElementNameNotAvailable
- Fixed a
framePr
- Remove
dbg! - Support
caps
- Support
tblppr - Support
tcMar - Support
textAlignment - Support
adjustRightInd - Support
framePr - Support
pageNumType
- Fixed a
title_pgcondition when read. - Parse
even_and_odd_headers.
- Fixed a js header/footer types.
- Fixed a bug, image in header/footer is not stored in media when read.
- Fixed a bug, image in header/footer is broken.
- Support part of
pPrDefault.
- read sectPr.type as
section_type.
- escape author in del/ins.
- use i32 for line instead of u32.
- read caps.
- Improve read numbering types.
- Make docGrid Optional in sectionProperty
- Support character spacing in run property
- Support character space control function
- Support character space control
- Fix widow_control behavior
- Support indent right for js
- [Breaking] make docGrid optional
- Support
<sym /> - Fixed a bug, style.link is not output.
- Fixed a bug, escape style name.
- Support
linkin style. - fix after contents in toc.
- Support outline_level in Paragraph and style.
- Support before/after contents in ToC.
- Support Toc from instrText.
- fix #584 Remove
%from width. - fixed a bug,
adjustLineHeightInTableis not affected in js interface. - fix lineRule ts type
- Support character space control
- Fix widow_control behavior
- Support indent right for js
- [Breaking] make docGrid optional
- Support
<sym />
- Fixed a bug, style.link is not output.
- Fixed a bug, escape style name.
- Support
linkin style.
- fix after contents in toc.
- Support outline_level in Paragraph and style.
- Support before/after contents in ToC.
- Support Toc from instrText.
- fix #584 Remove
%from width.
- fixed a bug,
adjustLineHeightInTableis not affected in js interface.
- fix lineRule ts type
- Support Pic alignment
- fix #554 Special characters are being carried across using HTML entities vs unicode
- Fix TableProperty json types.
- Support
specVanish.
- Use
Noneif heightRule not found instead ofauto
- escape hyperlink url(export)
- improve js/json types
- Support text direction (#545)
- read
<sdt>
- Support text direction (#545)
- Support rotate in pic
- [BugFix] Fixed a bug, hyperlink is broken with special characters.
- Support
sectionPropertyin pPr.
- Support table style #531
- [BugFix] Fixed a bug, hRule is not read in reader.
- [Breaking] change table row
hightRuletoautoin reader.
- Support
adjustLineHeightInTablein document setting
- [Breaking] Hyperlink interface.
- Support hyperlink reader.
- [Breaking] Remove default
TableCellMargin. Please specify if needed. - Support table cell margins reader.
- Support nested table reader.
- Add png image converter
- Add
imageDatainShapereader. - [BUGFIX] Fixed a bug, it is not able to read jpeg from js.
- [BUGFIX] Fixed a bug, it is not able to write images.
- [Breaking] Add
idandpathtoimagesoutput. - [BUGFIX] Use default
numPrif numId not found to avoid panic. - [Breaking] Use
self.based_onandself.nextinstyleinstead ofNormal. - [Breaking] Use
i32forPageMarginprops instead of unsigned. - support
columnsin document.
- re enable Hyperlink interface.
- [Breaking] Hyperlink interface.
- Support hyperlink reader.
- [Breaking] Remove default
TableCellMargin. Please specify if needed. - Support table cell margins reader.
- Support nested table reader.
- Add png image converter
- Add
imageDatainShapereader.
- [BUGFIX] Fixed a bug, it is not able to read jpeg from js.
- [BUGFIX] Fixed a bug, it is not able to write images.
- [Breaking] Add
idandpathtoimagesoutput.
- [BUGFIX] Use default
numPrif numId not found to avoid panic.
- [Breaking] Use
self.based_onandself.nextinstyleinstead ofNormal.
- [Breaking] Use
i32forPageMarginprops instead of unsigned.
- [Breaking] Change image size unit
pxtoemu. - [Breaking] fix
drawingjson types.
- Change
widthTypecase to camelCase in JS.
- Change
lineRulecase to camelCase in JS.
- Add js interface for
rStyle.
- Support
rStyle.
- Fixed a author of
delinins.
- Support
insin table row property
- Support
delin table row property
- Fixed a level reader to read paragraphProperty and runProperty
- Fixed a pPr reader.
- Fixed a del/ins type in runProperty
- Fixed a bug, numPr reader panic when id is none.
- Add
paragraphPropertyChangeapi for JS.
- Fixed a typo
window_control->widow_control - Fixed a numPr reader.
- [Internal]Support runFonts reader.
- Support minimum ToC API for JS (see #394).
- Fix
strikeAPI for JS.
- Support
strikefor run.
- Add
DataBindingAPI. See docx-core/examples/data_binding.rs - Add minimum
ToCAPI. See docx-core/examples/dirty_toc.rs
- Add before/afterLines to LineSpacingJSON.
- Fixed a missed pkg.
- Fix #327. Disable header if empty. (#369)
- Improve lineSpacing interface (#367)