Table of Contents

Class DocWrightConverter

Namespace
DocWright
Assembly
DocWright.dll

Converts supported Word document formats through the DocWright pipeline.

public sealed class DocWrightConverter
Inheritance
DocWrightConverter
Inherited Members

Remarks

Instances are stateless and safe for concurrent use from multiple threads; one conversion allocates one internal context. Determinism guarantee: identical input bytes and options produce byte-identical output on every supported framework, architecture and operating system (timestamps are omitted unless supplied via CreationDate).

Constructors

DocWrightConverter()

Initializes a converter with the default format registry: DOCX, legacy DOC, RTF, HTML, Markdown and plain-text readers, and DOCX, HTML, RTF, Markdown and plain-text writers.

DocWrightConverter(DocumentFormatRegistry)

Initializes a converter with a caller-supplied format registry.

Properties

FormatRegistry

Gets the input format registry. Hosts can register external readers here (for example fallback converters) without changing DocWright core packages.

Methods

ClearFontCache()

Releases every cached font engine this converter holds.

Convert(WordDocument, Stream, ConvertOptions?)

Converts a mutable DOM document directly.

Convert(Stream, Stream, ConvertOptions?)

Converts a supported document stream.

ConvertAsync(WordDocument, Stream, ConvertOptions?, CancellationToken)

Converts a mutable DOM document asynchronously.

ConvertAsync(Stream, Stream, ConvertOptions?, CancellationToken)

Converts a supported document stream asynchronously.

ConvertPdfToImages(Stream, ImageRenderOptions, ConvertOptions?)

Rasterizes the pages of an existing PDF to images, one per page.

ConvertToImages(WordDocument, ImageRenderOptions, ConvertOptions?)

Converts a mutable DOM document directly to raster images, one per page.

ConvertToImages(Stream, ImageRenderOptions, ConvertOptions?)

Converts a supported document stream to raster images, one per page.

Load(Stream, FormatDetection, ConvertOptions?)

Loads a supported document stream into the mutable DOM so callers can traverse and inspect content before conversion.

Save(WordDocument, Stream, string, SaveOptions?)

Saves a document back to a word-processing format, chosen by file extension.

Routed through FormatRegistry so a host-registered writer is reachable exactly the way a host-registered reader is. Saving is distinct from Convert(WordDocument, Stream, ConvertOptions?): converting renders the document to PDF, while saving round-trips it in an editable format, preserving everything the source carried.

SaveAsync(WordDocument, Stream, string, SaveOptions?, CancellationToken)

Saves a document asynchronously. The write itself is synchronous — writers stream straight to the output — so this buffers nothing and exists for call-site symmetry.