PeachPDF

PeachPDF.Network

MimeKitNetworkLoader Class

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.

public class MimeKitNetworkLoader : PeachPDF.Network.RNetworkLoader

Inheritance System.ObjectRNetworkLoader → MimeKitNetworkLoader

Constructors  
MimeKitNetworkLoader(Stream) Creates a loader that reads the MHTML archive from stream.
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.