Hi,

Another option to define 2 different page-master, one for the first page, and one for rest of pages.
Then define a page-sequence-master for a complex set of pages.

Example:

<fo:root>
        <fo:layout-master-set>
                <fo:simple-page-master master-name="a4" page-width="21cm" page-height="297mm" margin-top="1cm" 
margin-left="1cm" margin-right="1cm" margin-bottom="1cm">
                        <fo:region-body/>
                </fo:simple-page-master>
                <fo:simple-page-master master-name="a4_rest_footer" page-width="21cm" page-height="297mm" 
margin-top="1cm" margin-left="1cm" margin-right="1cm" margin-bottom="0.5cm">
                        <fo:region-body margin-bottom="1cm"/>
                        <fo:region-after extent="1cm"/>
                </fo:simple-page-master>

                <fo:page-sequence-master master-name="complex">
                        <fo:repeatable-page-master-alternatives>
                                <fo:conditional-page-master-reference page-position="first" 
master-reference="a4"/>
                                <fo:conditional-page-master-reference page-position="any" 
master-reference="a4_rest_footer"/>
                        </fo:repeatable-page-master-alternatives>
                </fo:page-sequence-master>
        </fo:layout-master-set>
        
        <fo:page-sequence initial-page-number="1" master-reference="complex" 
force-page-count="no-force">
                <fo:static-content flow-name="xsl-region-after">
                        <fo:block><fo:page-number/></fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                        <!-- Here comes the document body -->
                </fo:flow>
        </fo:page-sequence>
</fo:root>


Bye, Szeak

2015-03-22 17:30 keltezéssel, Roberto Nunnari írta:
Hi.

I need to change a servlet that generates a FO document and then transforms it into a pdf document. Unfortunately I know almost nothing about Formatting Objects. :-(

At present the FO adds the page number on every page.

I need to change it so that it adds the page number, but only if there are more than one page.

fop version in use is very old.. 0.91beta and build-Id is from 20051223

Any help very appreciated.

Thank you and best regards.
Robi

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to