Table of Contents

Method ConvertToImages

Namespace
DocWright
Assembly
DocWright.dll

ConvertToImages(Stream, ImageRenderOptions, ConvertOptions?)

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

public ConversionResult ConvertToImages(Stream input, ImageRenderOptions imageOptions, ConvertOptions? options = null)

Parameters

input Stream

The readable stream containing the source document.

imageOptions ImageRenderOptions

Raster options: DPI, format, quality and the per-page sink.

options ConvertOptions

The conversion options, or null for defaults.

Returns

ConversionResult

A summary of the conversion.

Remarks

Pages are delivered through PageStreamFactory or PageEncoded, because a raster format holds one page and a document has many. Setting neither renders only the first selected page and reports a diagnostic, rather than silently discarding the rest.

The pipeline up to layout is identical to Convert(Stream, Stream, ConvertOptions?) — same reader, same resolver, same layout engine — so a page's image and its PDF are two encodings of one layout, not two independent renderings.

Exceptions

ArgumentNullException

input or imageOptions is null.

ArgumentException

input is not readable.

ConvertToImages(WordDocument, ImageRenderOptions, ConvertOptions?)

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

public ConversionResult ConvertToImages(WordDocument document, ImageRenderOptions imageOptions, ConvertOptions? options = null)

Parameters

document WordDocument

The document to convert.

imageOptions ImageRenderOptions

Raster options: DPI, format, quality and the per-page sink.

options ConvertOptions

The conversion options, or null for defaults.

Returns

ConversionResult

A summary of the conversion.

Exceptions

ArgumentNullException

document or imageOptions is null.