<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">

<fo:layout-master-set>

<fo:simple-page-master master-name="page-1">
  <fo:region-body column-count="1" reference-orientation="0" margin="1in"/>
  <fo:region-after extent="0.9in"/>
</fo:simple-page-master>

<fo:simple-page-master master-name="page-2">
  <fo:region-body column-count="2" reference-orientation="90" column-gap="0.5in" margin="1in"/>
  <fo:region-end extent="0.9in" reference-orientation="90"/>
</fo:simple-page-master>

<fo:simple-page-master master-name="page-3">
  <fo:region-body column-count="3" reference-orientation="180" column-gap="0.3in" margin="1in"/>
  <fo:region-before extent="0.9in" reference-orientation="180"/>
</fo:simple-page-master>

<fo:simple-page-master master-name="page-4">
 <fo:region-body column-count="4" reference-orientation="270" column-gap="0.25in" margin="1in"/>
 <fo:region-start extent="0.9in" reference-orientation="270"/>
</fo:simple-page-master>

</fo:layout-master-set>

  
  
  

  
    <fo:page-sequence master-reference="page-1">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align="center" font="10pt Times">
         <fo:page-number/>
        </fo:block>
      </fo:static-content>
      <fo:static-content flow-name="xsl-footnote-separator">
        <fo:block text-align-last="justify" white-space-treatment="ignore">
          <fo:inline font="14pt ZapfDingbats" color="#C00000" alignment-baseline="central">✄</fo:inline>
          <fo:leader leader-pattern="dots" color="gray" font="10pt Times" alignment-baseline="central"/>
        </fo:block>
      </fo:static-content>


    <fo:flow flow-name="xsl-region-body">
    <fo:block font="bold 36pt Times" color="red" text-align="center" space-after="6pt">
       COLUMNS<fo:footnote><fo:inline baseline-shift="super" font-size="75%" keep-with-previous.within-line="always">(1)</fo:inline><fo:footnote-body><fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="2pt" space-before="6pt" space-before.conditionality="discard" line-height="1.2" font="9pt Times"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block><fo:wrapper keep-together.within-line="always" font-size="75%">(1)</fo:wrapper></fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block space-before="3pt" space-before.conditionality="retain">The first page has one column, 
       the second has two columns and so forth...</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:footnote-body></fo:footnote>
    </fo:block>

    
    <fo:block text-align="center" color="black">
        <fo:leader leader-length.optimum="2.4in" leader-pattern="rule" rule-style="solid" alignment-adjust="50%" rule-thickness="0.5pt"/>
        <fo:wrapper font="16pt ZapfDingbats" color="#E00000">❋</fo:wrapper>
        <fo:leader leader-length.optimum="2.4in" leader-pattern="rule" rule-style="solid" alignment-adjust="50%" rule-thickness="0.5pt"/>
    </fo:block>
  

    <fo:block font="16pt Times" color="maroon" space-before="6pt" space-after="9pt" text-align="center">
       <fo:wrapper font-weight="bold">XSL-FO</fo:wrapper> COLUMNS FORMATTING<fo:footnote><fo:inline baseline-shift="super" font-size="75%" keep-with-previous.within-line="always">(2)</fo:inline><fo:footnote-body><fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="2pt" space-before="6pt" space-before.conditionality="discard" line-height="1.2" font="9pt Times"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block><fo:wrapper keep-together.within-line="always" font-size="75%">(2)</fo:wrapper></fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block space-before="3pt" space-before.conditionality="retain">Simple 
       page test: 4 pages with different number of columns 
       and different orientation</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:footnote-body></fo:footnote>
    </fo:block> 

    <fo:block margin-left="0pt" padding-left="6pt" border-left="medium ridge #808080">

      <fo:block margin-left="0pt" margin-right="0pt" padding="6pt" background-color="#E0E0E0">

        <fo:wrapper text-align="justify" font="1pc Times">
          <fo:block><fo:wrapper font-size="3pc" color="red">T</fo:wrapper>his is the first page of the document.
            Its first capital letter T has red color and is 3 picas high. 
          </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
            <fo:block space-before="9pt">
               The text on the page has single-column style, 
               portrait orientation, and one-inch side margins. 
               The font family is <fo:wrapper font-family="monospace">Times</fo:wrapper>, text size equals 
               1 pica. The column has a vertical bar (medium-thickness
               gray ridge) at the left. The background color is light gray.
            </fo:block>
          
        </fo:wrapper>
      </fo:block>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>

  

    <fo:page-sequence master-reference="page-2">
      <fo:static-content flow-name="xsl-region-end">
        <fo:block text-align="center" font="10pt Times">
         <fo:page-number/>
        </fo:block>
      </fo:static-content>
      <fo:static-content flow-name="xsl-footnote-separator">
        <fo:block text-align-last="justify">
          <fo:leader leader-pattern="use-content" font="8pt ZapfDingbats" color="navy">▲▼</fo:leader>
        </fo:block>
      </fo:static-content>
    <fo:flow flow-name="xsl-region-body">

    <fo:block font="bold 24pt Times" color="#604020" text-align="center" space-after="6pt">COLUMNS</fo:block>

    
    <fo:block text-align="center" color="black">
        <fo:leader leader-length.optimum="1.2in" leader-pattern="rule" rule-style="solid" alignment-adjust="50%" rule-thickness="0.5pt"/>
        <fo:wrapper font="16pt ZapfDingbats" color="#E00000">❋</fo:wrapper>
        <fo:leader leader-length.optimum="1.2in" leader-pattern="rule" rule-style="solid" alignment-adjust="50%" rule-thickness="0.5pt"/>
    </fo:block>
  

    <fo:block font="13pt Helvetica" color="red" space-before="6pt" space-after="9pt" text-align="center">
      <fo:wrapper font-weight="bold">XSL-FO</fo:wrapper> COLUMNS FORMATTING<fo:footnote><fo:inline baseline-shift="super" font-size="75%" keep-with-previous.within-line="always">(3)</fo:inline><fo:footnote-body><fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="2pt" space-before="6pt" space-before.conditionality="discard" line-height="1.2" font="9pt Times"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block><fo:wrapper keep-together.within-line="always" font-size="75%">(3)</fo:wrapper></fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block space-before="3pt" space-before.conditionality="retain">
      This page has landscape orientation</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:footnote-body></fo:footnote></fo:block> 

    <fo:block margin-left="0pt" margin-right="0pt" padding="6pt" background-color="#FFE0C0" color="#604020">

      <fo:wrapper text-align="justify" font="11pt Helvetica">
        <fo:block><fo:wrapper font-size="3pc" color="red">T</fo:wrapper>his is the second page of the document.
          Its first capital letter T has red color and is 3 picas high. 
        </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
          <fo:block space-before="9pt">
            This is the second page in the document.  
            It has two columns, landscape orientation, and one-inch 
            side margins. Column gap equals 0.5 inches, text block 
            inside columns is padded 6 pt from all edges. Column 
            background is maroon, text color is black. The 
            font is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 11 pt. 
          </fo:block>
        
      </fo:wrapper>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>

  

    <fo:page-sequence master-reference="page-3">
      <fo:static-content flow-name="xsl-region-before">
        <fo:block text-align="center" font="10pt Times">
         <fo:page-number/>
        </fo:block>
      </fo:static-content>
      <fo:static-content flow-name="xsl-footnote-separator">
        <fo:block>
          <fo:leader leader-pattern="rule" leader-length="100%" rule-thickness="0.5pt" color="#007044"/>
        </fo:block>
      </fo:static-content>
    <fo:flow flow-name="xsl-region-body">

    <fo:block font="bold 24pt Times" color="#007044" text-align="center" space-after="6pt">
      <fo:wrapper text-decoration="underline">Columns<fo:footnote><fo:inline baseline-shift="super" font-size="75%" keep-with-previous.within-line="always">(4)</fo:inline><fo:footnote-body><fo:list-block provisional-distance-between-starts="15pt" provisional-label-separation="2pt" space-before="6pt" space-before.conditionality="discard" line-height="1.2" font="9pt Times"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block><fo:wrapper keep-together.within-line="always" font-size="75%">(4)</fo:wrapper></fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block space-before="3pt" space-before.conditionality="retain">The title is underlined.</fo:block></fo:list-item-body></fo:list-item></fo:list-block></fo:footnote-body></fo:footnote></fo:wrapper>
    </fo:block>


    <fo:block margin-left="0pt" padding-left="6pt" border-left="thin solid #007044">

      <fo:block margin-left="0pt" margin-right="0pt" padding="6pt" background-color="#FFFDD5" color="#007044">
 
        <fo:wrapper text-align="start" font="10pt Courier">
          <fo:block><fo:wrapper font-size="3pc" color="#007044">T</fo:wrapper>his is the third page of the document.
            Its first capital letter T is 3 picas high. 
          </fo:block>

          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
            <fo:block space-before="9pt">
               This is the third page in the document. It has three columns,
               reversed portrait orientation, and 0.3 inch column gap. The font
               is <fo:wrapper font-family="monospace">Courier</fo:wrapper>, 10 pt.
            </fo:block>
          
        </fo:wrapper>
      </fo:block>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>

  

    <fo:page-sequence master-reference="page-4">
      <fo:static-content flow-name="xsl-region-start">
        <fo:block text-align="center" font="10pt Times">
         <fo:page-number/>
        </fo:block>
      </fo:static-content>
    <fo:flow flow-name="xsl-region-body">

    <fo:block font="bold 18pt Helvetica" color="white" text-align="center" space-after="6pt" background-color="red">COLUMNS</fo:block>

    <fo:block margin-left="0pt" margin-right="0pt" padding="6pt" background-color="#0069B3" color="#FFFFFF">

      <fo:wrapper text-align="start" font="10pt Helvetica">
        <fo:block><fo:wrapper font-size="3pc" color="#FF0000">T</fo:wrapper>his is the fourth page of the document.
          Its first capital letter T has red color and is 3 picas high. 
        </fo:block>

        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
          <fo:block space-before="9pt">
             This is the fourth page in the document. It has four columns,
             reversed landscape orientation, and 0.25 inch column gap. The font
             is <fo:wrapper font-family="monospace">Helvetica</fo:wrapper>, 10 pt.
          </fo:block>
        
      </fo:wrapper>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>

</fo:root>