Skip to main content

Document Layout

The document layout represents the physical model of the document, constructed by the Layout Engine from the logical document structure. The hierarchical structure of the document layout is illustrated in the picture below:


Page settings are specified for each document section via the Section.Page and the Section.Margins properties. The Section.Columns property provides access to columns defined in the current section via the SectionColumns interface. To divide a section into columns, use the SectionColumns.CreateUniformColumns method to create a column layout and the SectionColumns.SetColumns method to apply the layout.

To determine the correspondence between the logical and physical document structures, the RichEditControl.GetPositionFromPoint and the RichEditControl.GetBoundsFromPosition methods can be helpful. The RichEditControl.GetLayoutPhysicalBoundsFromPosition method enables you to determine the location and dimensions of the rectangle which represents a character at the specified position.

The units of measurements within the control are specified by the RichEditControl.Unit property. The layout units of measurements can be set via the RichEditControl.LayoutUnit property.