page-number+1 in page-footer

View: New views
4 Messages — Rating Filter:   Alert me  

page-number+1 in page-footer

by Steve Kwee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

i have a somewhat strange requirement on rendering page-numbers:

My customer wants the number of the next-page in the page-footer.
"-2-" on the first page
"-3-" on the second page
...
nothing on the last page

Searching the list I understand that XSL processing and FOP processing are
separate with not feedback. So I understand that there is no way
counting pages in an xsl-variable and then doing some arithmetic with that.

Any ideas ?

Thank you for any comments and best regards
Steve




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: page-number+1 in page-footer

by Andreas Delmelle-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 17 Jun 2009, at 09:45, Steve Kwee wrote:

> i have a somewhat strange requirement on rendering page-numbers:
>
> My customer wants the number of the next-page in the page-footer.
> "-2-" on the first page
> "-3-" on the second page
> ...
> nothing on the last page

To start a fo:page-sequence with a predefined page-number, there is  
the property 'initial-page-number'[*] you can specify on the page-
sequence element. This is supported by FOP, so you should be able to  
make use of that.

For the surrounding dashes, XSL-FO 1.1 offers fo:folio-prefix and  
fo:folio-suffix[**] to decorate all fo:page-numbers or fo:page-number-
citations in a page-sequence. FOP, unfortunately, does not yet support  
those, so for the moment, you'll have to add the prefix and suffix  
manually (by means of plain text, fo:inlines or fo:wrappers).

[*] http://www.w3.org/TR/xsl/#initial-page-number
[**] http://www.w3.org/TR/xsl/#fo_folio-prefix

To omit the page-number entirely on the last page, define a simple-
page-master with a different region-after, and use it in the page-
sequence-master as a conditional-page-master-alternative with page-
position="last". (Note that FOP 0.95 or earlier still has an issue  
with using that page-master in case it is the only page, but this  
behavior has been fixed in FOP Trunk) Just give us a yell if you need  
further assistance with this.

> Searching the list I understand that XSL processing and FOP  
> processing are
> separate with not feedback. So I understand that there is no way
> counting pages in an xsl-variable and then doing some arithmetic  
> with that.

Not necessary, see above. I believe your requirements can be met  
without resorting to special XSLT processing.


HTH!

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: page-number+1 in page-footer

by Pascal Sancho :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Steve Kwee a écrit :

> Hello,
>
> i have a somewhat strange requirement on rendering page-numbers:
>
> My customer wants the number of the next-page in the page-footer.
> "-2-" on the first page
> "-3-" on the second page
> ...
> nothing on the last page
>
> Searching the list I understand that XSL processing and FOP processing are
> separate with not feedback. So I understand that there is no way
> counting pages in an xsl-variable and then doing some arithmetic with that.
>
> Any ideas ?
>
> Thank you for any comments and best regards
> Steve
if you don't need the current page number of the page, what you need is
probably to set the initial-page-number property on the fo:page-sequence.

HTH,
Pascal


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


RE: page-number+1 in page-footer

by Amick, Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>For the surrounding dashes, XSL-FO 1.1 offers fo:folio-prefix and
fo:folio-
>suffix[**] to decorate all fo:page-numbers or fo:page-number- citations
in a
>page-sequence. FOP, unfortunately, does not yet support those, so for
the moment,
>you'll have to add the prefix and suffix manually (by means of plain
text,
>fo:inlines or fo:wrappers).

>[*] http://www.w3.org/TR/xsl/#initial-page-number
>[**] http://www.w3.org/TR/xsl/#fo_folio-prefix 

I believe you can use the format property on fo:page-number as well; it
would be format="-1-".

Eric Amick
Legislative Computer Systems
Office of the Clerk




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...