2017-06-02 76 views
1

我试图在每个表格之后分页。这些表中的每一个都在<fo:block break-after="page" keep-together.within-page="0">。 它转换为PDF时似乎工作,但不转换为RTF。RTF中的XSL-FO break-after =“page”

RTF转换器中是否存在某种错误或者我做错了什么? 我用apache FOP 2.2运行这个。

全文档:

<?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> 

回答