k deepthi a écrit :
Hi All,
I have a requirement of some content in the header of page to come in first page only and should not be repeated in all pages. Please suggest me a best solution for the same. Regards
Deepthi.K.

Hi,
what you need is to use a couple of fo:conditional-page-master-reference, the 1st with the property page-position="first".
See attached FO.

HTH,
Pascal

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:svg="http://www.w3.org/2000/svg"; xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="firstPage">
      <fo:region-body margin="10mm"/>
      <fo:region-before region-name="xsl-region-before-firstPage" extent="10mm"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="nonFirstPage">
      <fo:region-body margin="10mm"/>
      <fo:region-before region-name="xsl-region-before-nonFirstPage" extent="10mm"/>
    </fo:simple-page-master>

    <fo:page-sequence-master master-name="allPages">
      <fo:repeatable-page-master-alternatives>
        <!-- NOTE: fo:c-p-m must be that order, 1st test at 1st place -->
        <fo:conditional-page-master-reference master-reference="firstPage"
            page-position="first"/>
        <fo:conditional-page-master-reference master-reference="nonFirstPage"
            page-position="any"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="allPages">
    <fo:static-content flow-name="xsl-region-before-firstPage">
      <fo:block>first page header</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="xsl-region-before-nonFirstPage">
      <fo:block>all otherpages header</fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
      <fo:block>first page content</fo:block>
      <fo:block break-before="page">2nd page content</fo:block>
      <fo:block break-before="page">3rd page content</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