简体   繁体   中英

Skip a page in XSL-FO?

I am looking for a way to force the flow in my document to skip a page. What I have so far is this (layout):

<fo:layout-master-set>
                    <fo:page-sequence-master master-name="document">
                        <fo:repeatable-page-master-alternatives maximum-repeats="2">
                            <fo:conditional-page-master-reference master-reference="letter" odd-or-even="odd"/>
                            <fo:conditional-page-master-reference master-reference="back-special" odd-or-even="even"/>
                        </fo:repeatable-page-master-alternatives>
                        <fo:repeatable-page-master-alternatives>
                            <fo:conditional-page-master-reference master-reference="continuation" odd-or-even="odd"/>
                            <fo:conditional-page-master-reference master-reference="back" odd-or-even="even"/>
                        </fo:repeatable-page-master-alternatives>
                    </fo:page-sequence-master>
                        <fo:simple-page-master master-name="letter" page-height="32.0cm" page-width="22.5cm" margin-top="12.2cm" margin-bottom="3cm" margin-left="2.3cm" margin-right="0.75cm">
                            <fo:region-body/>
                            <fo:region-before region-name="omr" extent="29.7cm"/>
                        </fo:simple-page-master>
                        <fo:simple-page-master master-name="back" page-height="32.0cm" page-width="22.5cm" margin-top="5.2cm" margin-bottom="1.8cm" margin-left="2.3cm" margin-right="2.0cm"  >
                            <fo:region-body/>
                            <fo:region-before region-name="omr-rest" extent="29.7cm"/>
                        </fo:simple-page-master>
                        <fo:simple-page-master master-name="continuation" page-height="32.0cm" page-width="22.5cm" margin-top="5.2cm" margin-bottom="1.8cm" margin-left="2.3cm" margin-right="2.0cm"  >
                            <fo:region-body/>
                            <fo:region-before region-name="conts" extent="29.7cm"/>
                        </fo:simple-page-master>
                        <fo:simple-page-master master-name="back-special" page-height="32cm" page-width="22.5cm" margin-top="5cm" margin-bottom="25cm" margin-left="2.5cm" margin-right="2.5cm">
                            <fo:region-body/>
                            <fo:region-before region-name="special" extent="29.7cm"/>
                        </fo:simple-page-master>
                        <fo:simple-page-master master-name="separator" page-height="32.0cm" page-width="22.5cm" margin-top="2.15cm" margin-bottom="1.15cm" margin-left="1.75cm" margin-right="0.75cm">
                            <fo:region-body/>
                        </fo:simple-page-master>
                </fo:layout-master-set>

and then a table, which refers to an external data source, within the flow:

                    <fo:table>
                    <fo:table-column column-width="1.8cm"/>
                    <fo:table-column column-width="5cm"/>
                    <fo:table-column column-width="3.2cm"/>
                    <fo:table-column column-width="3.8cm"/>
                    <fo:table-column column-width="4.0cm"/>
                     <fo:table-body space-after="1cm" space-before="1cm">
                       <xsl:for-each select="rems/rem">
                        <fo:table-row height="0.8cm" keep-together.within-column="always">
                            <fo:table-cell>
                                <fo:block font-family="Helvetica" font-size="8pt" text-align="left" ><xsl:value-of select="rem3"/></fo:block> <!--date-->
                            </fo:table-cell>
                            <fo:table-cell>
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="left" ><xsl:value-of select="rem4"/></fo:block>  <!--details 1-->
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="left" ><xsl:value-of select="rem5"/></fo:block>  <!--details 2-->
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="left" ><xsl:value-of select="rem6"/></fo:block>  <!--details 3-->
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="left" ><xsl:value-of select="rem7"/></fo:block>  <!--details 4-->
                            </fo:table-cell>
                            <fo:table-cell>
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="right" ><xsl:value-of select="rem8"/></fo:block> <!--payments-->
                            </fo:table-cell>
                            <fo:table-cell>
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="right" ><xsl:value-of select="rem9"/></fo:block>  <!--receipts-->
                            </fo:table-cell>
                            <fo:table-cell>
                               <fo:block font-family="Helvetica" font-size="8pt" text-align="right" ><xsl:value-of select="rem10"/></fo:block>  <!--balance-->
                            </fo:table-cell>
                        </fo:table-row>
                        </xsl:for-each>
                    </fo:table-body>                        
                </fo:table>

What I am trying to achieve is a primary document, with the beginning of the table, the next page (back-special) is to be blank (with a full page graphic), and the flow to skip this page entirely, before continuing on a continuation page (page 3 'continuation').

If I were to increase the top & bottom margin of "back-special" any more than they are, I get an error as follows: "UnsupportedOperationException: Don't know how to restart at positionNonLeafPos:26"...etc

I have read that it is a known issue in FOP , so I was just wondering if anyone has any suggestions to get around this.

您可以通过为母版页的“正文”区域使用不同的区域名称来实现此目的,请参见以下问题: 仅在奇数页上放置文本,跳过偶数页

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM