How to configure space after a block that spans multiple columns?

55 Views Asked by At

I have a two column layout that's frequently interrupted by blocks that span all columns.

All text appears in the correct columns, but the space-before and space-after attributes are ignored. What's the correct way to add spacing after a block that spans multiple columns?

<?xml version="1.0" encoding="UTF-8" ?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="two-col">
            <fo:region-body column-count="2" column-gap="1cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="two-col">
        <fo:flow flow-name="xsl-region-body">
            <fo:block span="all" space-after="1cm">
                Span all.
            </fo:block>
            <fo:block space-before="1cm">
                Left column.
            </fo:block>
            <fo:block break-before="column" space-before="1cm">
                Right column.
            </fo:block>
        </fo:flow>
    </fo:page-sequence>

</fo:root>

I'm using Apache FOP 2.9.

0

There are 0 best solutions below