fop-users@xmlgraphics.apache.org

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

fop-users@xmlgraphics.apache.org

Franz de Copenhague
This is my first question to the list.

I did try to google the way to have page numbers with roman numbers but I couldn't figure it out.

Would you modify the example below to illustrate me how to achieve roman page numbers?

<?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="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20">
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Thanks,
Franz
Reply | Threaded
Open this post in threaded view
|

Re: fop-users@xmlgraphics.apache.org

rsargent
Did you try
    initial-page-number="XX"
?

On 09/30/2015 01:34 PM, Franz de Copenhague wrote:
This is my first question to the list.

I did try to google the way to have page numbers with roman numbers but I couldn't figure it out.

Would you modify the example below to illustrate me how to achieve roman page numbers?

<?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="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20">
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Thanks,
Franz

Reply | Threaded
Open this post in threaded view
|

RE: fop-users@xmlgraphics.apache.org

Franz de Copenhague
It didn't help. It throws this exception: SEVERE: Invalid property value encountered in initial-page-number="XX": org.apache.fop.fo.expr.PropertyException

I wish could be an attribute similar to:

<fo:page-sequence master-reference="simple" initial-page-number="20" page-number-style= "upper-roman">

Franz

To: [hidden email]
From: [hidden email]
Date: Wed, 30 Sep 2015 13:35:26 -0600
Subject: Re: [hidden email]

Did you try
    initial-page-number="XX"
?

On 09/30/2015 01:34 PM, Franz de Copenhague wrote:
This is my first question to the list.

I did try to google the way to have page numbers with roman numbers but I couldn't figure it out.

Would you modify the example below to illustrate me how to achieve roman page numbers?

<?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="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20">
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Thanks,
Franz

Reply | Threaded
Open this post in threaded view
|

Re: fop-users@xmlgraphics.apache.org

pc.subscriptions@gmail.com
See http://www.dpawson.co.uk/xsl/sect3/N8703.html

<?xml version="1.0" encoding="utf-8"?>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20" format="i" >
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>




Peter

On 30 Sep 2015, at 21:53, Franz de Copenhague <[hidden email]> wrote:

It didn't help. It throws this exception: SEVERE: Invalid property value encountered in initial-page-number="XX": org.apache.fop.fo.expr.PropertyException

I wish could be an attribute similar to:

<fo:page-sequence master-reference="simple" initial-page-number="20" page-number-style= "upper-roman">

Franz

To: [hidden email]
From: [hidden email]
Date: Wed, 30 Sep 2015 13:35:26 -0600
Subject: Re: [hidden email]

Did you try
    initial-page-number="XX"
?

On 09/30/2015 01:34 PM, Franz de Copenhague wrote:
This is my first question to the list.

I did try to google the way to have page numbers with roman numbers but I couldn't figure it out.

Would you modify the example below to illustrate me how to achieve roman page numbers?

<?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="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20">
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Thanks,
Franz 

Reply | Threaded
Open this post in threaded view
|

RE: fop-users@xmlgraphics.apache.org

Franz de Copenhague
Peter,

Thank you! Like you say, It solves my problem  http://www.dpawson.co.uk/xsl/sect3/N8703.html#d12988e73

Actually, for upper-roman I did have to set the attribute format to "I"

Thanks,
Franz


From: [hidden email]
Subject: Re: [hidden email]
Date: Wed, 30 Sep 2015 22:10:22 +0200
To: [hidden email]

See http://www.dpawson.co.uk/xsl/sect3/N8703.html

<?xml version="1.0" encoding="utf-8"?>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20" format="i" >
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>




Peter

On 30 Sep 2015, at 21:53, Franz de Copenhague <[hidden email]> wrote:

It didn't help. It throws this exception: SEVERE: Invalid property value encountered in initial-page-number="XX": org.apache.fop.fo.expr.PropertyException

I wish could be an attribute similar to:

<fo:page-sequence master-reference="simple" initial-page-number="20" page-number-style= "upper-roman">

Franz

To: [hidden email]
From: [hidden email]
Date: Wed, 30 Sep 2015 13:35:26 -0600
Subject: Re: [hidden email]

Did you try
    initial-page-number="XX"
?

On 09/30/2015 01:34 PM, Franz de Copenhague wrote:
This is my first question to the list.

I did try to google the way to have page numbers with roman numbers but I couldn't figure it out.

Would you modify the example below to illustrate me how to achieve roman page numbers?

<?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="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
            <fo:region-body margin-top="3cm"/>
            <fo:region-before extent="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simple" initial-page-number="20">
        <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="end">page <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
            <fo:block> I would like to see page XX on top </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Thanks,
Franz