Method RenderAsync
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
documentILaidOutDocumentThe laid-out document.
outputStreamThe stream for the single-page path.
optionsRenderOptionsThe render options.
diagnosticsIConversionDiagnosticsThe diagnostics sink.
cancellationTokenCancellationTokenCancels between pages.
pageBoundaryCallbackAction<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.