lkracon
lkracon

Reputation: 13

XSL-FO break-after="page" in RTF

I'm trying to page break after each table. Each of those tables is in <fo:block break-after="page" keep-together.within-page="0">. It seems to work when converting to PDF, but not to RTF.

Is there some kind of bug in RTF converter or am I doing something wrong? I'm running this with apache FOP 2.2.

Full document:

<?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="A4" page-width="210mm" page-height="297mm" margin-top="7mm" margin-bottom="7mm" margin-left="2cm" margin-right="2cm">
            <!-- Page template goes here -->
            <fo:region-body margin-top="8mm" margin-bottom="8mm"/>
            <fo:region-before extent="5mm"/>
            <fo:region-after extent="5mm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4">
        <fo:static-content flow-name="xsl-region-before" font-size="8pt">
            <fo:block text-align-last="justify" border-bottom-style="solid" border-bottom-width="0.2pt"><!--  --><fo:page-number/>/<fo:page-number-citation ref-id="last-page"/><!--  --><fo:leader leader-pattern="space"/>TEST</fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body" font-size="8pt">
            <!--  -->
            <!--
                                                -->
            <fo:block break-after="page" keep-together.within-page="0">
                <fo:table table-layout="fixed" width="100%">
                    <!--  -->
                    <fo:table-column column-width="17cm"/>
                    <!--  -->
                    <fo:table-body>
                        <fo:table-row>
                            <!--  -->
                            <fo:table-cell>
                                <fo:block linefeed-treatment="preserve" white-space-collapse="false"><fo:inline font-weight="bold"/>

                                    <fo:inline font-weight="bold">
                                        <fo:inline font-style="italic">test
                                        </fo:inline>
                                    </fo:inline>

                                    test

                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:block>
                    <fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.2pt" color="black"/>
                </fo:block>
            </fo:block>
            <!--                                    -->
            <fo:block break-after="page" keep-together.within-page="0">
                <fo:table table-layout="fixed" width="100%">
                    <!--  -->
                    <fo:table-column column-width="17cm"/>
                    <!--  -->
                    <fo:table-body>
                        <fo:table-row>
                            <!--  -->
                            <fo:table-cell>
                                <fo:block linefeed-treatment="preserve" white-space-collapse="false">
                                    <fo:inline font-weight="bold">test
                                    </fo:inline>test

                                    <fo:inline font-weight="bold">
                                        <fo:inline font-style="italic">La Sieste
                                        </fo:inline>
                                    </fo:inline>
                                    test

                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:block>
                    <fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.2pt" color="black"/>
                </fo:block>
            </fo:block>
            <!--  -->
            <fo:block id="last-page"/>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

Upvotes: 1

Views: 1164

Answers (1)

Tony Graham
Tony Graham

Reputation: 8068

break-before and break-after are not implemented for FOP's RTF backend. See https://xmlgraphics.apache.org/fop/2.2/output.html#rtf

Upvotes: 1

Related Questions