PeachPDF
PeachPDF.Network
RNetworkLoader Class
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 three concrete implementations: DataUriNetworkLoader
(the default when none is configured), MimeKitNetworkLoader for MHTML archives, and
HttpClientNetworkLoader for HTTP(S) sources. data: URIs are always handled
internally regardless of which loader is configured.
public abstract class RNetworkLoader
Inheritance System.Object → RNetworkLoader
Derived
↳ DataUriNetworkLoader
↳ HttpClientNetworkLoader
↳ MimeKitNetworkLoader
| Properties | |
|---|---|
| BaseUri | The document’s base URL, used to resolve relative href, src, and CSS url() references. If null, relative references are resolved against the local file system. |
| Methods | |
|---|---|
| GetPrimaryContents() | Returns the root HTML document as a string. Called once at the start of rendering when null is passed as the HTML argument to a PdfGenerator.GeneratePdf/AddPdfPages overload. |
| GetResourceStream(RUri) | Returns the content of an external resource (a stylesheet or image) referenced by the document, or null if the resource cannot be resolved. |