You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Nwilan Glirt <nw...@hotmail.com> on 2002/11/11 11:07:35 UTC

Table and first/last page

I am using FO to transform an XML document into a nice business form (like 
an invoice). I am thinking of presenting all the postings in a table that 
runs across as many pages as needed. My problem is, that I want to make the 
top and bottom of the document to be different for the first page (should 
contain address etc.), last pages (should contain a total amount) and all 
the pages in between (should just list the postings).

I have been playing around with fo:repeatable-page-master-alternatives and 
conditional-page-master-reference, but that only seems to be affecting the 
selection of the page-master, which only deals with the "pysical aspects" of 
the page (size, margins etc), and those don't differ across the pages. I 
feel I got something basically wrong here. I would appreciate any help!





_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


Re: Table and first/last page

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Also look at the Dave Pawson's tutorial: 
http://www.dpawson.co.uk/xsl/sect3/bk/ch05.html#pseqs.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: Table and first/last page

Posted by Jeremias Maerki <de...@greenmail.ch>.
Here's a sample of a layout-master-set that has different page headers
for the first and other pages. The important hint is the region-name
that is overridden in fo:region-before.

<fo:layout-master-set>
	<fo:simple-page-master master-name="IS-11" page-height="29.7cm" page-width="21cm" margin-left="1.5cm" margin-right="1.3cm" margin-top="12mm" margin-bottom="0mm">
		<fo:region-before region-name="doc-header" extent="71mm"/>
		<fo:region-body margin-top="73mm" margin-bottom="10mm"/>
		<fo:region-after extent="10mm"/>
	</fo:simple-page-master>
	<fo:simple-page-master master-name="IS-12" page-height="29.7cm" page-width="21cm" margin-left="1.5cm" margin-right="1.3cm" margin-top="34mm" margin-bottom="0mm">
		<fo:region-before region-name="other-page-header" extent="17mm"/>
		<fo:region-body margin-top="19mm" margin-bottom="10mm"/>
		<fo:region-after extent="10mm"/>
	</fo:simple-page-master>
	<fo:page-sequence-master master-name="invoice">
		<fo:repeatable-page-master-alternatives>
			<fo:conditional-page-master-reference master-reference="IS-11" page-position="first"/>
			<fo:conditional-page-master-reference master-reference="IS-12"/>
		</fo:repeatable-page-master-alternatives>
	</fo:page-sequence-master>
</fo:layout-master-set>

Further down the document you'll then have the following:

<fo:static-content flow-name="doc-header">

<fo:static-content flow-name="other-page-header">

instead of 

<fo:static-content flow-name="xsl-region-before">


This lets you define separate page headers. What you currently can't do
is define a conditional-page-master-reference for page-position="last".
This is not implemented.


On Mon, 11 Nov 2002 11:07:35 +0100 Nwilan Glirt wrote:
> I am using FO to transform an XML document into a nice business form (like 
> an invoice). I am thinking of presenting all the postings in a table that 
> runs across as many pages as needed. My problem is, that I want to make the 
> top and bottom of the document to be different for the first page (should 
> contain address etc.), last pages (should contain a total amount) and all 
> the pages in between (should just list the postings).
> 
> I have been playing around with fo:repeatable-page-master-alternatives and 
> conditional-page-master-reference, but that only seems to be affecting the 
> selection of the page-master, which only deals with the "pysical aspects" of 
> the page (size, margins etc), and those don't differ across the pages. I 
> feel I got something basically wrong here. I would appreciate any help!


Jeremias Maerki