Table of Contents

Class ImageLayoutRenderer

Namespace
DocWright.Renderers.Imaging
Assembly
DocWright.Renderers.Imaging.dll

Rasterizes a laid-out document to PNG or JPEG pages.

public sealed class ImageLayoutRenderer : ILayoutRenderer
Inheritance
ImageLayoutRenderer
Implements
Inherited Members

Remarks

The second implementation of ILayoutRenderer, consuming the same LayoutDocument the PDF renderer consumes. Because one layout feeds both, image and PDF output of a page are self-consistent by construction — and that is also the strongest test signal available, since a rasterized PDF and this renderer's PNG can be compared directly.

The seam itself takes one stream and one page range. A raster format holds one page, so multi-page output goes through PageStreamFactory or PageEncoded; with neither set, only the first selected page is written. That keeps the frozen four-argument seam usable without widening it.

Constructors

ImageLayoutRenderer(FontEngine, ImageRenderOptions?)

Initializes the renderer.

Properties

OutputFormatName

Gets the stable output format identifier, for example "pdf".

Methods

Render(ILaidOutDocument, Stream, RenderOptions, IConversionDiagnostics)

Renders the document to the output stream in a single forward-only pass.

Render(ILaidOutDocument, Stream, RenderOptions, IConversionDiagnostics, CancellationToken, Action<int, int>?)

Renders with cancellation and a page-boundary callback.

RenderAsync(ILaidOutDocument, Stream, RenderOptions, IConversionDiagnostics, CancellationToken, Action<int, int>?)

Renders asynchronously.