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:root>
                        <fo:layout-master-set>
                                <fo:simple-page-master master-name="A4-portrait"
                                        page-height="29.7cm" 
page-width="21.0cm" margin-top="1cm"
                                        margin-right="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:simple-page-master>
                        </fo:layout-master-set>

                        <fo:page-sequence master-reference="A4-portrait">
                                <fo:static-content flow-name="xsl-region-before"
                                        margin-left="1cm">
                                        <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:table-row>
                                                                <fo:table-cell>
                                                                        
<fo:block>
                                                                                
HEADER
                                                                        
</fo:block>
                                                                </fo:table-cell>
                                                        </fo:table-row>
                                                </fo:table-body>
                                        </fo:table>
                                </fo:static-content>
                                <fo:static-content flow-name="xsl-region-after">
                                        <fo:block>AFTER</fo:block>
                                </fo:static-content>
                                <fo:static-content flow-name="xsl-region-start">
                                        <fo:block />
                                </fo:static-content>
                                <fo:flow flow-name="xsl-region-body" 
font-size="9">
                                        <fo:block>FLOW</fo:block>
                                </fo:flow>
                        </fo:page-sequence>
                </fo:root>
        </xsl:template>
</xsl:stylesheet>

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
Gernot 
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to