You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Eivind Andreassen <ei...@usit.uio.no> on 2006/06/14 14:30:24 UTC
variable containing the page number
Hi
I want to put the value of fo:page-number into a variable because i have
different static-content depending on what page number it is. I want to
use this variable to check what page number it is. Do anyone know how to
do this?
regards
Eivind Andreassen.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: variable containing the page number
Posted by Glen Mazza <gm...@apache.org>.
> Eivind Andreassen wrote:
>
>> Hi
>>
>> I want to put the value of fo:page-number into a variable because i
>> have different static-content depending on what page number it is. I
>> want to use this variable to check what page number it is. Do anyone
>> know how to do this?
>
>
http://marc.theaimsgroup.com/?l=fop-user&m=113078517606736&w=2
Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: variable containing the page number
Posted by Chris Bowditch <bo...@hotmail.com>.
Eivind Andreassen wrote:
> Hi
>
> I want to put the value of fo:page-number into a variable because i have
> different static-content depending on what page number it is. I want to
> use this variable to check what page number it is. Do anyone know how to
> do this?
Variables exist in the XSLT process, page-numbers exist only in
XSL-FO->PDF generation. These are separate processes between which there
is no state sharing.
So what you asked for is not possible. Fortunately XSL-FO provides
another means to achieve different static-content on different pages.
Here is a snipper from the franklin_alt.fo file which is an example
shipped with FOP:
<!-- layout for the first page -->
<fo:simple-page-master master-name="right"
page-height="21.7cm"
page-width="16cm"
margin-top="1cm"
margin-bottom="1cm"
margin-left="3.5cm"
margin-right="1.5cm">
<fo:region-body margin-top="2cm" margin-bottom="2cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent="2cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="left"
page-height="21.7cm"
page-width="16cm"
margin-top="1cm"
margin-bottom="1cm"
margin-left="1.5cm"
margin-right="3.5cm">
<fo:region-body margin-top="2cm" margin-bottom="2cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent="2cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="alternating">
<fo:repeatable-page-master-alternatives maximum-repeats="no-limit">
<fo:conditional-page-master-reference master-reference="right"
odd-or-even="odd" />
<fo:conditional-page-master-reference master-reference="left"
odd-or-even="even" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
Hopefully it gives you the idea.
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: variable containing the page number
Posted by Chris Bowditch <bo...@hotmail.com>.
Gregor & Stefan wrote:
<snip/>
> i'm creating booklets with 4,8,12,16 pages and every two last pages has
> to be single pages.
So you want a different static-content on the last front side?
>
> something like:
>
> <fo:repeatable-page-master-alternatives maximum-repeats="pages - 2">
> [...] </...
> <fo:single-page-master-reference master-reference="before-last"/>
> <fo:single-page-master-reference master-reference="last"/>
I don't think this is possible unless you know the exact page number :(
What needs to change in the static content for the last front side? If
its just different text then you can achieve this using markers.
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: variable containing the page number
Posted by Gregor & Stefan <w2...@wikisquare.de>.
[...]
> So you want a different static-content on the last front side?
yes.
> I don't think this is possible unless you know the exact page number :(
mmh i thought/think the same :-)
> What needs to change in the static content for the last front side? If
> its just different text then you can achieve this using markers.
it's a completly different page with borders, headers, footers i think
this will be a little hard with markers.
anyway to achieve page numbers divisible by four i evaluate the areatree
with an xslt in a first run. just thougt their could be a cool hack out
there :-)
cheers,
gregor
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: variable containing the page number
Posted by Gregor & Stefan <w2...@wikisquare.de>.
Hi,
this thread has arised an interesting point for my project ...
[...]
> So what you asked for is not possible. Fortunately XSL-FO provides
> another means to achieve different static-content on different pages.
do you have any idea to realize this a little more complex?
what i need is: the maximun repeats in dependency on the total number of
pages.
i'm creating booklets with 4,8,12,16 pages and every two last pages has
to be single pages.
something like:
<fo:repeatable-page-master-alternatives maximum-repeats="pages - 2">
[...] </...
<fo:single-page-master-reference master-reference="before-last"/>
<fo:single-page-master-reference master-reference="last"/>
i know how to set the last page in a page repeat loop, but the pages
before last?
thanks!
gregor
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org