XSLfast offers you to design the layout of a multipage document in a comfortable way using regions. As described in the chapter Page, there are different regions, which can be combined to control the looks of the document.
You start with a page, which will be used as the body of the document, where the actual contents are placed. Let's create a quick layout with a simple table, which runs over several pages.
Select the XML file ..\Tutorial\10_Example_manual\Example.xml.
Create a table with one row and two columns:

Group the table to ProductGroup/Product:

Now drag the node Report/ProductGroup/Product/Name into the first cell:

Add an XML image frame to the second cell and assign it to the node Report/ProductGroup/Product/Properties/img:

Select the image base where the images are located ..\Tutorial\Example_manual\img to make sure XSLfast can find the images.

As you do not specify the commands Fit in Frame and Keep aspect ratio, the images will be displayed in their original size. If you processed this layout now, it would have three pages:

So far we have not specified any elements in regions at all.
We want to have pagination for this document. We would like to have the page number on the right side for odd pages, on the left side for even pages. Use the command Page->Insert Page->Add even page regions. A new page opens which displays the page body in grey and only the regions in white.

Your body page now shows its body in white and the regions in grey.
Only the regions should be edited here, elements placed in the grey region are not considered in the generated document. They are also marked with a red frame.
Place a pagination element into the left bottom corner, because these are the regions for even pages and we want it on the left side:

Now use the command Page->Insert Page->Add odd page regions and place a pagination frame into the right bottom corner:

Now you have three tabs open: body, even regions and odd regions. Process your layout now:

On the first page, the pagination is on the right side, on the second page it is on the left side, on the third page it is back on the right side. With regions you can control the elements shown in your document, even if the design is different for odd or even pages or you can add a title and a tail page or a first or last page or use different designs for the first page and all other pages and so on. The regions can be combined with each other, e.g. odd and even regions and a title page.
Please note: Some of these functions are not operational with FOP or they need to be combined in a special way to work correctly. Using FOP requires e.g. the specification of both odd and even regions and does not allow using the first page/last page function.
|
Command |
May be used with |
Result |
To be considered |
|
Add first page regions |
Add rest page regions |
The first page has a specified region, all other pages have differently specified regions or no specified regions |
|
|
|
Add last page regions |
First and last page have the same regions, all other pages have different regions or no specified regions |
|
|
Add last page regions |
Add first page regions |
First and last page have the same regions, all other pages have different regions or no specified regions |
FOP does not allow this function |
|
|
Add rest page regions |
The last page has a specified region, all other pages have other specified regions or no specified regions |
|
|
Add rest page regions |
Add first/last page regions |
See above |
|
|
Add any page regions |
May be combined with all other regions |
All pages will have these regions, including first or last pages |
|
|
Add even page regions |
None |
All even pages will have these regions |
FOP requires odd and even regions |
|
Add odd page regions |
None |
All odd pages will have these regions |
FOP requires odd and even regions |
|
Add any page regions (odd or even) |
None |
All pages will have these regions |
|