PeachBrackets

PeachBrackets.HtmlDocument

HtmlDocument.LayoutAsync(Canvas) Method

Breaks the document into pages. Call it once, after LoadAsync(string, RenderContext, HtmlDocumentOptions) and before anything that needs the pages.

public System.Threading.Tasks.Task LayoutAsync(PeachDrawing.Core.Canvas measuringCanvas);

Parameters

measuringCanvas Canvas

a canvas made by the same render context, used to measure text; nothing is drawn on it

Returns

System.Threading.Tasks.Task
a task that completes when the pages are known

Exceptions

System.ArgumentNullException
measuringCanvas is null

System.InvalidOperationException
the document was already laid out