xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Roberts" <Karl.Robe...@macquarie.com>
Subject RE: region-before falls between region-start and region-end
Date Tue, 14 Feb 2006 02:32:39 GMT
Hi All I found a mechanism to make it work like I expected...
I had to set the prescedence to true on region-before and region-after
Eg

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes"
xmlns:fn="http://www.w3.org/2004/07/xpath-functions"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<fo:layout-master-set>
		<fo:simple-page-master margin-right="1cm"
margin-left="1cm" margin-bottom="1cm" margin-top="1cm" page-width="21cm"
page-height="29.7cm" master-name="mastertest">
			<fo:region-body margin-right="2cm"
margin-left="2cm" margin-bottom="2.5cm" margin-top="4cm"
region-name="xsl-region-body"/>
			<fo:region-before precedence="true"
background-color="red" extent="3.5cm" region-name="xsl-region-before"/>
			<fo:region-after precedence="true"
background-color="yellow" extent="2cm" region-name="xsl-region-after"/>
			<fo:region-start precedence="false"
background-color="green" extent="1.5cm" region-name="xsl-region-start"/>
			<fo:region-end precedence="false"
background-color="blue" extent="1.5cm" region-name="xsl-region-end"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="mastertest">
		<fo:flow flow-name="xsl-region-body">
			<fo:block>					
						content stuff
					</fo:block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>

Cheers

Karl
 

-----Original Message-----
From: Karl Roberts 
Sent: Tuesday, 14 February 2006 11:33 AM
To: fop-users@xmlgraphics.apache.org
Subject: region-before falls between region-start and region-end

Hi FOP Users,

I'm using FOP Version 0.91beta to generate pdf from xsl-fo

I think that I'm right in saying that region-before should position like
the lintle of a door on top of region-body, region-start and region-end
i.e. like so:  (as described
http://www.w3schools.com/xslfo/xslfo_pages.asp )

 _______________________________________
|                                       |
|    region-before                      |
|_______________________________________|
|         |                  |          |
| region- |                  |  region- |
| start   |  region-body     |  end     |
|         |                  |          |
|         |                  |          |
|         |                  |          |
|_________|__________________|__________|
|                                       |
|   region-after                        |
|_______________________________________|

However my PDF ends up like:

 _______________________________________
|         |                  |          |
|         |   region-before  |          |
|         |__________________|          |
|         |                  |          |
| region- |                  |  region- |
| start   |  region-body     |  end     |
|         |                  |          |
|         |                  |          |
|         |                  |          |
|         |__________________|          |
|         |                  |          |
|         |  region-after    |          |
|_________|__________________|__________|

Is that correct?

My xsl-fo file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes"
xmlns:fn="http://www.w3.org/2004/07/xpath-functions"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<fo:layout-master-set>
		<fo:simple-page-master margin-right="1cm"
margin-left="1cm" margin-bottom="1cm" margin-top="1cm" page-width="21cm"
page-height="29.7cm" master-name="mastertest">
			<fo:region-body margin-right="2cm"
margin-left="2cm" margin-bottom="2.5cm" margin-top="4cm"
region-name="xsl-region-body"/>
			<fo:region-before background-color="red"
extent="3.5cm" region-name="xsl-region-before"/>
			<fo:region-after background-color="yellow"
extent="2cm" region-name="xsl-region-after"/>
			<fo:region-start background-color="green"
extent="1.5cm" region-name="xsl-region-start"/>
			<fo:region-end background-color="blue"
extent="1.5cm" region-name="xsl-region-end"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="mastertest">
		<fo:flow flow-name="xsl-region-body">
			<fo:block>

						content stuff
			</fo:block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>


Am I misunderstanding this or is there a bug in the pdf Renderer?

Cheers

Karl




NOTICE
This e-mail and any attachments are confidential and may contain
copyright material of Macquarie Bank or third parties. If you are not
the intended recipient of this email you should not read, print,
re-transmit, store or act in reliance on this e-mail or any attachments,
and should destroy all copies of them. Macquarie Bank does not guarantee
the integrity of any emails or any attached files. The views or opinions
expressed are the author's own and may not reflect the views or opinions
of Macquarie Bank.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message