PeachPDF

PeachPDF.Network Namespace

Classes  
DataUriNetworkLoader The default RNetworkLoader used when NetworkLoader is left unset. Resolves only data: URIs; any other resource URI (remote stylesheets, remote images, HTTP(S) sources) is silently skipped. This is the safest default for server-side environments where network access must be opted into explicitly rather than assumed.
FileUriNetworkLoader An RNetworkLoader that serves the root HTML document and every resource it references (stylesheets, images, fonts) from the local file system via file: URIs. Its BaseUri is set the way a browser sets a local document’s base URL: to the loaded file’s own file: URI (so relative references resolve against its directory), or — when no primary file is given — to the current working directory. file: resources resolve through this loader automatically regardless of which loader is configured (mirroring how data: URIs are always handled internally), so relative references in an in-memory HTML string load from disk by default. Setting AllowLocalFileAccess to false turns that off: file: resource requests are then refused even for a document rendered through this loader, though the root document it was constructed with is still read.
HttpClientNetworkLoader An RNetworkLoader that fetches the root HTML document and every resource it references (stylesheets, images) over HTTP(S) using a caller-supplied System.Net.Http.HttpClient. The caller controls the System.Net.Http.HttpClient’s lifetime, so custom headers, authentication, proxies, timeouts, and System.Net.Http.HttpMessageHandler chains are all supported without any PeachPDF-specific API.
MimeKitNetworkLoader An RNetworkLoader backed by a self-contained MHTML archive (what Chrome calls a “single page document”). The root HTML and every resource it references (stylesheets, images, fonts) are read from the archive’s MIME parts, matched by their Content-Location, so no network or file-system access is needed to render the document.
RNetworkLoader Controls how PeachPDF loads the root HTML document and every external resource it references (stylesheets, images). Set an instance on NetworkLoader to integrate PeachPDF with a custom resource source (a cloud blob store, a bundler manifest, an in-memory dictionary, etc.). PeachPDF ships four concrete implementations: DataUriNetworkLoader (the default when none is configured), FileUriNetworkLoader for local files, MimeKitNetworkLoader for MHTML archives, and HttpClientNetworkLoader for HTTP(S) sources. data: URIs are always handled internally regardless of which loader is configured, as are file: URIs unless AllowLocalFileAccess is set to false, which refuses them outright.
RNetworkResponse The result of resolving a resource URI via GetResourceStream(RUri).
RUri Wraps System.Uri for use throughout PeachPDF’s resource-loading pipeline, adding special-case handling for data: URIs (which System.Uri can parse but, on older target frameworks, cannot round-trip correctly through AbsoluteUri) and helpers for resolving a relative URI against a base URI.