Table of Contents

Method RenderAsync

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

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

Renders asynchronously.

public Task RenderAsync(ILaidOutDocument document, Stream output, RenderOptions options, IConversionDiagnostics diagnostics, CancellationToken cancellationToken = default, Action<int, int>? pageBoundaryCallback = null)

Parameters

document ILaidOutDocument

The laid-out document.

output Stream

The stream for the single-page path.

options RenderOptions

The render options.

diagnostics IConversionDiagnostics

The diagnostics sink.

cancellationToken CancellationToken

Cancels between pages.

pageBoundaryCallback Action<int, int>

Receives (completed, total) after each page.

Returns

Task

A task that completes when every selected page has been written.

Remarks

Rasterization is CPU-bound, so this is the synchronous path plus asynchronous stream writes rather than a parallel one. It exists to match the PDF renderer's shape at the facade, not to promise concurrency the algorithm does not have.