Skip to content

writeDocx

writeDocx(flow): WriteResult

Defined in: src/word/docx-writer.ts:232

Serialize a FlowDoc to a WordprocessingML package (E-DOCX) — the inverse of the docx reader. A flow medium with zero layout and zero I/O: the body’s resolved properties are written as direct (denormalized) formatting, so the round-trip is semantic, not byte-for-byte. Emits the main document plus numbering, footnotes/endnotes, comments (+ commentsExtended), per-section headers/footers, charts and media parts; anything not yet serialized is reported as a Loss.

FlowDoc

The interlayer to write back.

WriteResult

The encoded .docx bytes and the loss report.