You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Davor Cengija <dc...@mcs.hr> on 2000/11/06 09:25:43 UTC
fop: page numbers are not reset
Cocoon 1.8, but if I remember correctly, the same problem was
with 1.7.4.
I have an XSL file which converts Bosak's Shakespeare's dramas
to PDF, and at the bottom of each page I have a page number
displayed. It displays correct numbers only in the first
generated PDF, and in any other it just continues from where
it ended in the previous PDF. E.g. If Hamlet PDF is 130 pages
long, King Lear's first page would be numbered as 131 etc.
It could be that I messed something with XSL (which is still
very new technology to me), but I just copied it from the
examples and adjusted a little. Here it is (only the first
template, '/'):
<xsl:template match="/">
<xsl:processing-instruction name="cocoon-format">type="text/xslfo"</xsl:processing-instruction>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
page-master-name="right"
margin-top="75pt"
margin-bottom="25pt"
margin-left="100pt"
margin-right="50pt">
<fo:region-body margin-bottom="50pt"/>
<fo:region-after extent="25pt"/>
</fo:simple-page-master>
<fo:simple-page-master
page-master-name="left"
margin-top="75pt"
margin-bottom="25pt"
margin-left="50pt"
margin-right="100pt">
<fo:region-body margin-bottom="50pt"/>
<fo:region-after extent="25pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence>
<fo:sequence-specification>
<fo:sequence-specifier-alternating
page-master-first="right"
page-master-odd="right"
page-master-even="left"/>
</fo:sequence-specification>
<fo:static-content flow-name="xsl-after">
<!-- HERE'S THE PAGE NUMBER -->
<fo:block text-align-last="centered" font-size="10pt"><xsl:value-of select="/PLAY/PLAYSUBT"/> by William Shakespeare - p. <fo:page-number/></fo:block>
</fo:static-content>
<fo:flow>
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
Thanks.
P.S. Is there support for fop 0.14?
--
v
Davor Cengija
dcengija@mcs.hr
===========================
"Nicht mit Alkohol mischen"
RE: page numbers are not reset
Posted by Peter Jacobs <pe...@advalvas.be>.
from the fop-dev list:
-----Original Message-----
From: Wes Goggan [mailto:wgoggan@redsky.com]
Sent: Friday, October 27, 2000 7:00 PM
To: 'fop-dev@xml.apache.org'
Subject: RE: [BUG] Multiple invocations keep page-number running wild
Just use the property initial-page-number as below.
<fo:page-sequence master-name="psmA" initial-page-number="1">
Wes
-----Original Message-----
From: Manfred Riem [mailto:mriem@win.tue.nl]
Sent: Friday, October 27, 2000 5:31 AM
To: fop-dev@xml.apache.org
Subject: [BUG] Multiple invocations keep page-number running wild
Hi all,
I think I've found a bug that is quite annoying if
you use FOP in the same application multiple times
(in Cocoon ;-) ).
If you set page-number in a static context it is not
reset at the next invocation of FOP, but instead it
starts off where it left off.... I don't know if you
see this as a bug, I do, especially when you're using
FOP for online transformations of xml-files. Which
happens to work great.
Greetz,
Manfred Riem
Computer Science Student
Eindhoven University of Technology.
PS. Answer by email please as you guys don't support
digest receiving of the mailing-lists (which is the
way to go if you want to keep track of changes, but
are not a developer).