Table of Contents

Method Compose

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

Compose(LayoutContext)

Generates the content of this component.

LayoutComponentContent Compose(LayoutContext context)

Parameters

context LayoutContext

The rendering context.

Returns

LayoutComponentContent

The generated content.

Remarks

Use the AvailableSize property to split component content between multiple pages. Set HasMoreContent to false when the component content does not fit into the available size.

The library calls this method twice per each page. First time, the library needs the component content when calculating the total number of pages in the generated document. Second time, the library uses the component content to actually render the generated document.

You can detect the current pass using the LayoutCompleted property. The Reset() method allows you to reset the component's state before the second pass.

Make sure to generate content of the same size for both passes. Otherwise, you may get an incorrect document.