Table of Contents

Class DocxReader

Namespace
DocWright.Formats.Docx
Assembly
DocWright.Formats.Docx.dll

Reads Office Open XML WordprocessingML (.docx) into the mutable DocWright document model. The main document part is consumed in a single streaming pass (one paragraph or table row materialized at a time); styles, numbering, theme and settings are parsed from their small parts; everything DocWright does not model is preserved — unknown XML as islands on the nearest node, unknown package parts opaquely — so nothing is silently dropped.

public sealed class DocxReader : IDocumentReader
Inheritance
DocxReader
Implements
Inherited Members

Remarks

The returned WordDocument stays bound to the input stream: image bytes and preserved parts are streamed lazily on demand. Keep the input stream open until the document is disposed.

Constructors

DocxReader()

Fields

MaxElementNestingDepth

The deepest XML element nesting this reader will admit in a part it parses.

Properties

Format

Gets the format this reader handles.

Methods

CanRead(Stream)

Determines whether the stream appears to contain this reader's format by sniffing its leading bytes. The stream must be seekable; implementations must restore Position before returning.

Read(Stream, DocumentReadOptions, IConversionDiagnostics)

Reads a document from the stream.