<?xml version='1.0' encoding='utf-8'?>
<fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format'>
  <fo:layout-master-set>
    <fo:simple-page-master master-name='A4' page-width='297mm' page-height='210mm' margin-top='1cm' margin-bottom='1cm' margin-left='1cm' margin-right='1cm'>
      <fo:region-body margin='3cm'></fo:region-body>
      <fo:region-before extent='2cm'></fo:region-before>
      <fo:region-after extent='2cm'></fo:region-after>
      <fo:region-start extent='2cm'></fo:region-start>
      <fo:region-end extent='2cm'></fo:region-end>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference='A4' format='A'>
    <fo:flow flow-name='xsl-region-body'>
      <fo:block font-size="18pt" font-family="sans-serif" line-height="24pt" space-after.optimum="15pt"
                background-color="blue" color="white" text-align="center" padding-top="3pt">
        FOP Recipe to render precise Pdf using jsReport
      </fo:block>
      <fo:block>
        <fo:inline font-weight='bold'>jsReport recipe Fop allows you to create very precise
          pdf layouts using Apache™ FOP (Formatting Objects Processor).

          The goal is that template can use all the jsReport features like templating tags, helpers or extensions
          to assemble final FO xml that is afterwards transformed into pdf using Apache FOP. This
          means we can do the same fibonacci example also using FO. Tak a look:
        </fo:inline>
      </fo:block>
      <fo:block margin-top="1cm">
        <fo:table table-layout="fixed" border="1pt solid black">
        <fo:table-column column-width="1cm"></fo:table-column>
        <fo:table-column column-width="3cm"></fo:table-column>
        <fo:table-body font-size="10pt" font-family="sans-serif"  border="inherit">
        
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6600">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">0</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">1</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6610">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">1</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">1</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6620">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">2</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">2</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6630">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">3</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">3</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6640">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">4</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">5</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6650">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">5</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">8</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6660">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">6</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">13</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6670">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">7</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">21</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6680">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">8</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">34</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
          <fo:table-row line-height="12pt"  border="inherit"  background-color="#DD6690">
        <fo:table-cell  border="inherit">
          <fo:block text-align="start">9</fo:block>
        </fo:table-cell>
        <fo:table-cell  border="inherit">
        <fo:block text-align="end">55</fo:block>
        </fo:table-cell>
        </fo:table-row>
          
        </fo:table-body>
        </fo:table>
      </fo:block>
      <fo:block margin-top="1cm">
        <fo:inline font-weight='bold'>This was just very simple. For details options of FO xml see</fo:inline>
        <fo:basic-link color="blue" external-destination="http://xmlgraphics.apache.org/fop">http://xmlgraphics.apache.org/fop</fo:basic-link>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>