Title: RE: Headers and pagination

Hi,

I've just been playing with this stuff, and it all seems to work fine.

If you don't specify "initial-page-number" the pages will happily keep counting; you can even change the format between page sequences without affecting the count.

One thing I did notice: if you use initial-page-number then something tries to force the new page sequence onto an odd page; this does not happen when allowing the page numbers to flow on between sequences.  You can prevent this behaviour using force-page-count="no-force" (I'm assuming it defaults to "auto" when using initial-page-count).

>FOP now implements fully 2 properties on fo:page-sequence that
>are exactly what you need - 'force-page-count' and 'initial-
>page-number'. You will be the first known 3rd party tester. :-)
>Also check out the 'format' property...

I've included a test sample below which works fine with last night's CVS.  Just change the commented page-sequence bits to experiment with the different numbering/formatting possibilities.

Regards,

Twylite

-- XML included below, hope your mailer knows what not to do.

<?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="cover"
            page-height="29.7cm"
            page-width="21cm"
            margin-top="2.5cm"
            margin-bottom="2.5cm"
            margin-left="2.5cm"
            margin-right="2cm">
            <fo:region-after extent="1cm" />
            <fo:region-body margin-top="3cm" />
        </fo:simple-page-master>

        <fo:simple-page-master master-name="meta"
            page-height="29.7cm"
            page-width="21cm"
            margin-top="2.5cm"
            margin-bottom="2.5cm"
            margin-left="2.5cm"
            margin-right="2cm">
            <fo:region-after extent="1cm" />
            <fo:region-body margin-top="1.1cm" margin-bottom="1.1cm" />
        </fo:simple-page-master>

        <fo:simple-page-master master-name="bodypage"
            page-height="29.7cm"
            page-width="21cm"
            margin-top="2.5cm"
            margin-bottom="2.5cm"
            margin-left="2.5cm"
            margin-right="2cm">
            <fo:region-after extent="1cm" />
            <fo:region-body margin-top="2.1cm" margin-bottom="1.1cm" />
        </fo:simple-page-master>

    </fo:layout-master-set>

<!--    <fo:page-sequence master-name="cover"> -->
    <fo:page-sequence master-name="cover" force-page-count="no-force">

        <fo:static-content flow-name="xsl-region-after">
            <fo:block font-family="Helvetica" font-size="10pt" text-align="start">
                Page: <fo:page-number />
            </fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">

            <fo:block font-family="Helvetica" font-size="18pt" text-align="center">
                My Reference Manual
            </fo:block>

        </fo:flow>
    </fo:page-sequence>

<!--    <fo:page-sequence master-name="meta" format="i"> -->
<!--    <fo:page-sequence master-name="meta" format="i" initial-page-number="1"> -->
    <fo:page-sequence master-name="meta" format="i" initial-page-number="1" force-page-count="no-force">

        <fo:static-content flow-name="xsl-region-after">
            <fo:block font-family="Helvetica" font-size="10pt" text-align="start">
                Page: <fo:page-number />
            </fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">
            <fo:block font-family="Times Roman" font-size="12pt" text-align="justify">
                First page of metadata.
            </fo:block>
        </fo:flow>

    </fo:page-sequence>

<!--   <fo:page-sequence master-name="bodypage"> -->
    <fo:page-sequence master-name="bodypage" initial-page-number="1">

        <fo:static-content flow-name="xsl-region-after">
            <fo:block font-family="Helvetica" font-size="10pt" text-align="start">
                Page: <fo:page-number />
            </fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">
            <fo:block font-family="Times Roman" font-size="12pt" text-align="justify">
                First page of body.
            </fo:block>
        </fo:flow>

    </fo:page-sequence>

</fo:root>

Reply via email to