It is possible Alexis. See the following code:

At the end of your fo document put a variable like this:

<snip>

<!-- id used to calculate total pages -->
<fo:block id="terminator"/>

Where you would like the page (x of y) printed put the following:

<snip>

<fo:page-number/> of <fo:page-number-citation ref-id="terminator"/>

That works nicely in my documents. 

A warning though, there is a notice about this potentially causing memory
problems in very large documents:

http://xml.apache.org/fop/running.html#memory

Hope this helps,

Mark

-----Original Message-----
From: MIDON ALEXIS [mailto:[EMAIL PROTECTED]
Sent: 22 October 2004 10:12
To: '[EMAIL PROTECTED]'
Subject: Accessing total page



hi,

is it possible to access the total page?

My goal is to format a footer like "page 2 of 21"

I am able to get the current page number (page-number) but the total remains
unknown.

Thx in advance.


Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to