xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gernot Kogler <ger...@kogler-informatik.ch>
Subject Page Model
Date Fri, 05 Mar 2010 08:05:02 GMT
Hi everybody

I'm new to XSL-FO and apache fop. I'm trying to create a report with a left margin of 1cm
for the header and body. The footer (region-after) should have a left margin of 0. The header
contains a table. I tried tot achive this with a left margin of 1cm for the region-body and
the region-before. Here's the basic stylesheet for testing:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output method="xml" indent="yes" />

	<xsl:template match="/">
				<fo:simple-page-master master-name="A4-portrait"
					page-height="29.7cm" page-width="21.0cm" margin-top="1cm"
					<fo:region-body margin-top="10cm" margin-bottom="1cm"
						margin-left="1cm" margin-right="0" />
					<fo:region-before extent="10cm" />
					<fo:region-after extent="11cm" />
					<fo:region-start extent="0" />
					<fo:region-end extent="1cm" />

			<fo:page-sequence master-reference="A4-portrait">
				<fo:static-content flow-name="xsl-region-before"
					<fo:table table-layout="fixed" width="100%">
						<fo:table-column column-width="13cm" />
						<fo:table-column column-width="3.5cm" />
						<fo:table-body font-size="9">
				<fo:static-content flow-name="xsl-region-after">
				<fo:static-content flow-name="xsl-region-start">
					<fo:block />
				<fo:flow flow-name="xsl-region-body" font-size="9">

It seems that the left margin applied to region-before is inherited by the inner table resulting
in a left margin of 2cm for the table. I could set the left margin on the table-body instead
(which solves the problem), but I don't want to do this because the header region will be
quite complex containing several tables. So I want to "shift right" the whole content of the
region-before. Is there a solution for my problem?

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

View raw message