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 Henrik Holle <hh...@megatel.de> on 2002/04/10 10:44:12 UTC

page-number

hi,

how can i count all pages in my document? i have different "page-sequence
master-reference" but want to something like :" this document has 12 pages".

is it possible?


regards

henrik


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


Re: AW: page-number

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Henrik Holle wrote:
> but one of my page-sequences has "initial-page-number="1"". FOP only count x
> pages, but my document has x+1 pages. without "initial-page-number="1""
> everything works fine?

I don't understand the problem. The setting
initial-page-number="1" is the default.
Do you have a title page or something, or do you actually
mean you use initial-page-number="0"?
The element fo:page-number-citation will not give you a
page count, it will give you the page number calculated
for the page the referenced block happens to end up on.
It's just the common case that people start counting with
1, in which case page count and last page number have the
same value. If you want to have a real page count
independent of the initial page number, you are out of
luck, the standard provides no mechanism for getting it.
There are a number of possibilities to work around this
in FOP, which one to use depends heavily on your problem
environment and the skills you can muster.


J.Pietschmann


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


AW: page-number

Posted by Henrik Holle <hh...@megatel.de>.
i tried it this way:

	<fo:flow flow-name="xsl-region-body">
     <xsl:apply-templates select="data"/>
     <fo:block id="lastpage"></fo:block>  <!-- IMPORTANT: THIS MUST BE THE
LAST THING!!!-->
	</fo:flow>

but one of my page-sequences has "initial-page-number="1"". FOP only count x
pages, but my document has x+1 pages. without "initial-page-number="1""
everything works fine?


-----Ursprungliche Nachricht-----
Von: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Gesendet: Mittwoch, 10. April 2002 21:40
An: fop-dev@xml.apache.org
Betreff: Re: page-number


Henrik Holle wrote:
> how can i count all pages in my document? i have different "page-sequence
> master-reference" but want to something like :" this document has 12
pages".
> is it possible?

Yes, you got some hints already.
Keep in mind that this will force FOP to keep all
pages in memory until the last page is rendered.
If you get a memory overflow exception, remove the
forward reference to the last page first.

J.Pietschmann




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


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


Re: page-number

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Henrik Holle wrote:
> how can i count all pages in my document? i have different "page-sequence
> master-reference" but want to something like :" this document has 12 pages".
> is it possible?

Yes, you got some hints already.
Keep in mind that this will force FOP to keep all
pages in memory until the last page is rendered.
If you get a memory overflow exception, remove the
forward reference to the last page first.

J.Pietschmann




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