title: Inserting a cover page into XSL:FO template
body: <p>I have worked with these documents where I need to edit the existing code in order to map fields from a database. The XSL document already has the template and regions in place. My goal is to add a cover page before any of the margins of the template occur. </p>
  
  <p>The code looks like this:</p>
  
  <pre><code>&lt;fo:layout-master-set&gt;
      &lt;fo:simple-page-master master-name="Letter Page" page-width="8.3in" page-height="11.7in" 
          margin-top="0px" margin-bottom="0px" margin-right="0px" margin-left="0px"&gt;
          &lt;fo:region-body region-name="xsl-region-body" 
              padding-top="0px" padding-bottom="0px" padding-left="0px" padding-right="0px" 
              margin-top="4.250cm" margin-bottom="2.750cm" margin-left="1.8cm" margin-right="1.8cm" 
              border-style="none" border-width="0px" border-color="" background="" background-repeat="no-repeat" background-position-horizontal="0px" background-position-vertical="0px" 
              extent="0px" column-gap="0px" column-count="1" reference-orientation="0"/&gt;
          &lt;fo:region-before region-name="xsl-region-before" 
              display-align="after" extent="3.8cm" 
              padding-top="0px" padding-bottom="0px" padding-left="0px" padding-right="0px" 
              border-style="none" border-width="0px" border-color="" background="" background-repeat="no-repeat" background-position-horizontal="0px" background-position-vertical="0px" reference-orientation="0"/&gt;
          &lt;fo:region-after region-name="xsl-region-after" 
              display-align="before" extent="2.750cm" 
              padding-top="0px" padding-bottom="0px" padding-left="0px" padding-right="0px" 
              border-style="none" border-width="0px" border-color="" background="" background-repeat="no-repeat" background-position-horizontal="0px" background-position-vertical="0px" reference-orientation="0"/&gt;
          &lt;fo:region-start region-name="xsl-region-start" 
              extent="1.8cm" 
              padding-top="0px" padding-bottom="0px" padding-left="0px" padding-right="0px" 
              border-style="none" border-width="0px" border-color="" background="" background-repeat="no-repeat" background-position-horizontal="0px" background-position-vertical="0px" reference-orientation="0"/&gt;
          &lt;fo:region-end region-name="xsl-region-end" 
              extent="1.8cm" 
              padding-top="0px" padding-bottom="0px" padding-left="0px" padding-right="0px" 
              border-style="none" border-width="0px" border-color="" background="" background-repeat="no-repeat" background-position-horizontal="0px" background-position-vertical="0px" reference-orientation="0"/&gt;
      &lt;/fo:simple-page-master&gt;
  &lt;/fo:layout-master-set&gt;
  </code></pre>
  
  <p>Then pages starts as </p>
  
  <pre><code>&lt;fo:page-sequence master-reference="Letter Page"&gt;  
      &lt;fo:static-content flow-name="xsl-region-before" font-size="8pt" font-family="Arial"&gt;
  </code></pre>
  
  <p>Followed by any other regions etc. I looked up how to insert some cover pages but I keep getting errors when I try and all I am using is notepad++ and rendering the pdf each time I test so it is becoming a very time consuming process. I've decided to just throw an image as the cover page to save myself some time. I am aware that this is an FOP engine 1.0. </p>