PeachBrackets

PeachBrackets.HtmlDocument

HtmlDocument.LoadAsync(string, RenderContext, HtmlDocumentOptions) Method

Parses html and cascades its style sheets, ready to be laid out.

public static System.Threading.Tasks.Task<PeachBrackets.HtmlDocument> LoadAsync(string html, PeachDrawing.Core.RenderContext renderContext, PeachBrackets.HtmlDocumentOptions? options=null);

Parameters

html System.String

the HTML source

renderContext RenderContext

the fonts, images and resource loading the document uses; set its LayoutUnitsPerPoint before loading

options HtmlDocumentOptions

the page size, margins and style environment, or null for the defaults of HtmlDocumentOptions

Returns

System.Threading.Tasks.Task<HtmlDocument>
the loaded document

Exceptions

System.ArgumentNullException
html or renderContext is null