[英]How break page after my element in xsl-fo
我將此代碼用於apache xsl-fo:
<xsl:template match="depFileNom">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master margin-right="1cm"
margin-left="2.7cm"
margin-bottom="2cm"
margin-top="2cm"
page-width="21.5cm"
page-height="29.7cm"
master-name="first">
<fo:region-body margin-right="1cm" margin-left="0cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:static-content flow-name="xsl-after">
<fo:block text-align="center" font-size="10pt"><fo:page-number /></fo:block>
</fo:static-content>
<fo:block font-family="Times" font-size="15pt">
<fo:table>
<fo:table-column column-width="10000px" text-align="left"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-style='none' vertical-align='middle'><fo:block><xsl:apply-templates select="year" /> year</fo:block></fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
I want to break here
...
我認為需要使用:
分頁符,前
分頁,后
但我不知道請幫助我
很難確定,因為你的FO不完整,但嘗試將屬性page-break-after="always"
到fo:block
。 如果你想在fo:table
之后破解,並且在同一個fo:block
有以下兄弟,請嘗試將page-break-after="always"
到fo:table
。
根據您的數據,您可能還需要考慮對不同的內容使用不同的fo:page-sequence
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.