Table of Contents

Interface IResourceLoader

Namespace
NetPdf
Assembly
NetPdf.dll

Resolves external resources referenced by HTML/CSS — images, fonts, stylesheets. Implementations may load from disk, embedded assemblies, HTTP, in-memory caches, etc. NetPdf provides no default loader; if a resource is referenced but no loader is set, the resource is skipped and a RES-LOAD-FAILED-001 diagnostic is emitted.

public interface IResourceLoader

Methods

LoadAsync(Uri, ResourceKind, CancellationToken)

Load the resource at uri.

ValueTask<ResourceResponse> LoadAsync(Uri uri, ResourceKind kind, CancellationToken ct)

Parameters

uri Uri

Absolute URI resolved against BaseUri.

kind ResourceKind

What the resource will be used as.

ct CancellationToken

Cancellation token honored by the loader.

Returns

ValueTask<ResourceResponse>

The bytes plus optional MIME / charset hints.