Here is my problem:
I have a document that may have 1 to N pages. I would like to print
something on the of the last page. If there is only on page, the last page
is also the first.
I tried something like:
<!-- layout for "normal" pages -->
<fo:region-after region-name="ordinary_footer" extent="0cm"/>
<!-- layout information for the last page which contains a
special footer -->
<fo:region-after region-name="last_page_footer" extent="9.5cm"/>
If the footer doesn't fit on a page according to the body dimension,
then I want it on an additional page that will be the last, but then, I
want a different layout for the (N-1) previous pages: without any footer.
It doesnt work: I made several tests but it looks like I have the footer
on every page instead of the last one only.
Thanx a billion,
Arved Sandstrom wrote:
Jens In the page masters
you can explicitly specify the region-master names also, using the 'region-name'
property. It so happens that many people leave these off in examples, and
the default values (such as 'xsl-region-start') get assigned. So don't
trust examples all the time. :-) Let's
say you have one page-master for the first page, and another page-master
for the rest of the pages. Give the region-before's different region-names.
Then, in your page-sequence, define 2 static-contents for the headers,
one of which references one region-name, and the other references the other
region-name. They will get appropriately mapped. Hope
this helps. Arved Sandstrom
----- Original Message -----
Sent: Monday, December 03, 2001 11:21
Subject: Re: a custom header according
to page number
I do have a similar (or the same?) problem. I have a flow that
runs through all the pages. On the first page, though, I'd like to have
a different header (static content). So far I defined two simple-page masters
and a page-sequence-master that uses a simple-page master for the first
page and the other one for the rest.
But where do I specify where which (static content) header to use? In
the page-masters I can only set margins etc.(?) I tried to use two
page-sequences, one for each page master, but then I get the XML-content
twice: once for the first page sequence once for the second. Can I specify
static content in the page-master?
Cyril Rognon schrieb:
If you only need to ditinguish the first
page from the other ones, simply use a different page-master (reference
or name ;-) according to the spec conformance) and use this page master
for your cover page only. This will do the trick easily.
one page-master for the cover (one page-sequence using this page-master-reference)
, and different page-master for the rest of the page sequences.
I strongly recomend you to read some FO tutorial, this will spare you
a lot of research work (you'll find some ref on http://www.w3.org/Style/XSL/)
At 14:18 03/12/2001 +0000, you wrote:
please see answers
Your question is a little underspecified ...
no, I don't want to distinguish odd and even pages, specifically, I need
to distinguish the frist page from the rest of the pages, any clue?
Don't think about using some predicate considering the page number, xsl
fo and fop are loosely coupled, it is meant to be that way. So it forbids
the user to use the internal page number programaticaly (some FO processor
provide extension to do this, fop does not).
yes, I kind of noticed that , it is usually one way: FOP code -> fo XSL
if your need is more complex and you have some magic formula to guess wich
page is affected, conditionnal master-page may be to low level ...
I'll give conditional-master-page some insight and hope it will work, thanks