Skip to main content

Document Layout

  • 2 minutes to read

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

PhysicalDocument

The following list provides the information about the main document layout structural elements (from top to bottom nesting levels).

  • Page

    Contains:

    • The offset in the Document Model’s text buffer. This offset specifies the beginning of the main sub-document’s content. This offset does not depend on the contents of other sub-documents.
    • A list of Page Areas that are parts of the main sub-document.
    • A dictionary containing Page Areas of the Page‘s all sub-documents except for the main sub-document.
  • Page Area

    Contains:

    • The offset that specifies where within the Page layout element the Page Area content begins.
    • A list of Columns. All Page Areas that relate to other (not main) sub-documents, contain a single Column.
  • Column

    Contains:

    • The offset that specifies where within the Page Area layout element the Column content begins.
    • A list of Rows.
    • A list of Paragraph Frames (rectangles with the applied color, such as the paragraph background color).
    • A list of LayoutTableColumnInfo objects exposing the information about tables contained within the Column.
  • Row

    Contains:

    • The offset that specifies where within the Column layout element the Row content begins.
    • A list of Boxes.
  • Box

    Contains:

    • The offset that specifies where within the Row layout element the Box content begins.
    • The content specific for certain box types (such as LayoutColumnBreakBox, LayoutDashBox, LayoutLineBreakBox, LayoutSpaceBox, LayoutTabSpaceBox, LayoutTextBox).