You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by wa...@xavor.com.pk on 2001/05/07 12:15:02 UTC

How to get total number of pages generated in the PDF document

I want to display
     Page    CURRENT_PAGE_NUMBER     of      TOTAL_PAGES
in the footer of my document.
I am using the following code

     Page <fo:page-number/> of <fo:page-number-citation ref-id="endofDoc"/>
and at the end of the document, I am attaching this block
<fo:block id="endofDoc"></fo:block>

But what i am getting is
     Page 1 of y
     page 2 of y
etc.
I cant understand why it is producing "y" instead of giving the page
citaion of the block which is on the very last page...

Note: I am displaying this in <fo:static-content>... Can it be the problem

Pls advise
Thanx
Wajid



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: How to get total number of pages generated in the PDF document

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Hi, Wajid

What version of FOP are you using? I just ran some tests and I see the 
expected (correct) behaviour, even with an empty fo:block.

If your FO file is not too large, attach it and we can take a look.

Regards,
Arved Sandstrom

On Monday 07 May 2001 10:27, Mark wrote:
> I had this problem in the AWT viewer but in PDF it was fine. Does this
> help?

> On 07 May 2001 15:15:02 +0500, wali@xavor.com.pk wrote:
> > I want to display
> >      Page    CURRENT_PAGE_NUMBER     of      TOTAL_PAGES
> > in the footer of my document.
> > I am using the following code
> >
> >      Page <fo:page-number/> of <fo:page-number-citation
> > ref-id="endofDoc"/> and at the end of the document, I am attaching this
> > block
> > <fo:block id="endofDoc"></fo:block>
> >
> > But what i am getting is
> >      Page 1 of y
> >      page 2 of y
> > etc.
> > I cant understand why it is producing "y" instead of giving the page
> > citaion of the block which is on the very last page...
> >
> > Note: I am displaying this in <fo:static-content>... Can it be the
> > problem
> >
> > Pls advise
> > Thanx
> > Wajid

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: How to get total number of pages generated in the PDF document

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Hi, Wajid

What version of FOP are you using? I just ran some tests and I see the 
expected (correct) behaviour, even with an empty fo:block.

If your FO file is not too large, attach it and we can take a look.

Regards,
Arved Sandstrom

On Monday 07 May 2001 10:27, Mark wrote:
> I had this problem in the AWT viewer but in PDF it was fine. Does this
> help?

> On 07 May 2001 15:15:02 +0500, wali@xavor.com.pk wrote:
> > I want to display
> >      Page    CURRENT_PAGE_NUMBER     of      TOTAL_PAGES
> > in the footer of my document.
> > I am using the following code
> >
> >      Page <fo:page-number/> of <fo:page-number-citation
> > ref-id="endofDoc"/> and at the end of the document, I am attaching this
> > block
> > <fo:block id="endofDoc"></fo:block>
> >
> > But what i am getting is
> >      Page 1 of y
> >      page 2 of y
> > etc.
> > I cant understand why it is producing "y" instead of giving the page
> > citaion of the block which is on the very last page...
> >
> > Note: I am displaying this in <fo:static-content>... Can it be the
> > problem
> >
> > Pls advise
> > Thanx
> > Wajid

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: How to get total number of pages generated in the PDF document

Posted by Mark <ma...@plasticsoftware.com.au>.
Hi

I had this problem in the AWT viewer but in PDF it was fine. Does this
help?

cheers
Mark


On 07 May 2001 15:15:02 +0500, wali@xavor.com.pk wrote:
> 
> I want to display
>      Page    CURRENT_PAGE_NUMBER     of      TOTAL_PAGES
> in the footer of my document.
> I am using the following code
> 
>      Page <fo:page-number/> of <fo:page-number-citation ref-id="endofDoc"/>
> and at the end of the document, I am attaching this block
> <fo:block id="endofDoc"></fo:block>
> 
> But what i am getting is
>      Page 1 of y
>      page 2 of y
> etc.
> I cant understand why it is producing "y" instead of giving the page
> citaion of the block which is on the very last page...
> 
> Note: I am displaying this in <fo:static-content>... Can it be the problem
> 
> Pls advise
> Thanx
> Wajid
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>