2. Creating the page and body areas

2.1. Overview

Create the layout (activateLayout)

  • First create a new Page Viewport (makeNewPage).

    • First finish the current page (finishPage).

    • Then create the new page viewport (createPage).

      • First get the page master (getSimplePageMasterToUse, pageSequence.getPageSequenceMaster or pageSequence.getSimplePageMaster).

      • Then get the body (currentSimplePageMaster.getRegion, from currentSimplePageMaster's regions map).

      • Then create the page viewport (createPageAreas(currentSimplePageMaster)).

        • From the properties of the page master create the page reference rectangle, a new page, a new FODimension object, and a CTM object.

        • For each region in the page master (in our example we only have a body):

          • make a region viewport (makeRegionViewport), which involves calculating the position of the region on the page, using the FODimension and CTM objects.

          • make the reference area (makeRegionBodyReferenceArea, makeRegionReferenceArea).

At this point the page viewport and its region viewports have been laid out.

  • Then create the body's main reference area (createBodyMainReferenceArea).
  • Then create a Span (createSpan).
  • And get the flowIPD (curFlow.getIPD()).

At this point the body has a single span area with a single flow area without children.