Table of Contents

Interface IPdfVectorRenderer

Namespace
PdfEngine.Vector
Assembly
PdfEngine.Abstractions.dll

Renderer capable of replaying an immutable vector display list to raster or native surfaces.

public interface IPdfVectorRenderer : IDisposable
Inherited Members

Methods

AnalyzeAsync(IPdfDisplayList, CancellationToken)

Every region needing fallback for this backend: the display list's own tokens plus what only the backend can detect (font programs it cannot load, glyphs a substitute lacks, images it cannot decode).

Task<IReadOnlyList<PdfFallbackToken>> AnalyzeAsync(IPdfDisplayList displayList, CancellationToken cancellationToken = default)

Parameters

displayList IPdfDisplayList
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<PdfFallbackToken>>

RenderDisplayListAsync(IPdfDisplayList, RenderRequest, IPdfFallbackProvider?, CancellationToken)

Draws displayList into a new BGRA pixel buffer.

ValueTask<RenderedPage> RenderDisplayListAsync(IPdfDisplayList displayList, RenderRequest request, IPdfFallbackProvider? fallbackProvider = null, CancellationToken cancellationToken = default)

Parameters

displayList IPdfDisplayList

The page to draw, from GetPageDisplayListAsync(int, CancellationToken).

request RenderRequest

The resolution, output size and viewer rotation.

fallbackProvider IPdfFallbackProvider

Draws the regions this renderer cannot draw faithfully, or null to draw them by best effort.

cancellationToken CancellationToken

Cancels the render.

Returns

ValueTask<RenderedPage>

The pixels. Dispose the result to release its buffer.