Hello!

I am using Apache FOP 0.95 and I have a problem how to insert some static text 
to the last page of page sequence. In case of multiple pages document, it works 
OK. But in case of single page document, FOP says, that the only one page is 
ANY page and not the LAST page. The same logic with the FIRST page works OK. I 
guess, that more specific (better matching) position should be taken as with 
the higher precedence. Can You help me, please? See attached FO with my 
problem. I also tried proposed solution from 
"http://services.renderx.com/lists/xep-support/3856.html";, but it does not work 
me using FOP 0.95. 

Thank You in advance, Stepan 
<?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="lastPage" page-height="29.7cm" page-width="21.0cm" margin="2cm">
      <fo:region-body margin="2cm" />
      <fo:region-before extent="2cm" />
      <fo:region-after region-name="lastPage" extent="2cm" />
    </fo:simple-page-master>
    <fo:simple-page-master master-name="firstPage" page-height="29.7cm" page-width="21.0cm" margin="2cm">
      <fo:region-body margin="2cm" />
      <fo:region-before extent="2cm" />
      <fo:region-after region-name="firstPage" extent="2cm" />
    </fo:simple-page-master>
    <fo:simple-page-master master-name="anyPage" page-height="29.7cm" page-width="21.0cm" margin="2cm">
      <fo:region-body margin="2cm" />
      <fo:region-before extent="2cm" />
      <fo:region-after region-name="anyPage" extent="2cm" />
    </fo:simple-page-master>
    <fo:page-sequence-master master-name="chapter">
      <fo:repeatable-page-master-alternatives>
        <!-- to try it, just switch between commenting line 23 and 25 -->
        <!-- page-position="last" does NOT works as I want. -->
        <!--<fo:conditional-page-master-reference page-position="last" master-reference="lastPage"/>-->
        <!-- page-position="first" does works as I want. -->
        <fo:conditional-page-master-reference page-position="first" master-reference="firstPage"/>
        <fo:conditional-page-master-reference page-position="any" master-reference="anyPage"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="chapter">
    <fo:static-content flow-name="lastPage">
      <fo:block>THIS IS THE LAST PAGE.</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="firstPage">
      <fo:block>THIS IS THE FIRST PAGE.</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="anyPage">
      <fo:block>THIS IS ANY PAGE.</fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
      <!--<fo:block>Multi page text. It behaves as I want. Add another words to create multi page text.</fo:block>-->
      <fo:block>Single page text. It behaves as I do not want.</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to