Programming and Coding
Page Regions in XSL-FO
XSL-FO uses the following elements to define the regions of a page:
Only fo:region-body is required. The followingfigure shows one arrangement of the regions:
Note: region-before, region-after, region-start, and region-end is a part of the region-body. To avoid text in the region-body to overwrite text in the other regions, the region-body must have margins at least the size of these regions.
Regions have names, and content is directed to the page regions based on the region’s name. The following figure shows the default, initial name for each page region FO, which just happens to look a lot like the FO’s name, such as “xsl-region-body” for fo:region-body.
But you don’t have to stick with the initial names. You can define the regions with any name, such as “my-before”, “my-end”, or even “George”, provided it’s:
An additional proviso that works across page masters is that you can’t use the same name on different region types on different page masters. So “George” can’t be a fo:region-before on one page master and fo:region-start on another.
The flip-side of the proviso above is that you can use the same region name for the same region on different page masters.
The margins you set for the region-body must be greater than or equal to the extents of the the region-before and region-after. If you do something like this:
you can expect results like
© 2020 Digcode.com. All rights reserved.