Page Sequences

Now that you know how to define masters, it is time to look at how you can specify the way they should be arranged and used in a document. A tag <fo:page-sequence-master> serves exactly that purpose.

It specifies what master definitions should be used in which "roles" in the document. An example demonstrates its purpose better than my description could:

<fo:page-sequence-master master-name="pages">
  <fo:repeatable-page-master-alternatives>
    <fo:conditional-page-master-reference
      page-position="only"
      master-reference="onlyPage"/>
    <fo:conditional-page-master-reference
      page-position="first"
      master-reference="firstPage"/>
    <fo:conditional-page-master-reference
      page-position="last"
      master-reference="lastPage"/>
    <fo:conditional-page-master-reference
      page-position="rest"
      master-reference="middlePage"/>
  </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

Remember, how we defined a master called onlyPage in the previous section? Here, it is put into context: it should be used when the page-position="only", i.e. when the document contains one page and one page only. I surmise the other page-position options are self-explanatory.

results matching ""

    No results matching ""