我想在我的XSLT表中使用fo:block-container
并生成XSL-FO。例如,要更改表格的方向:
<fo:block-container
reference-orientation="90"
break-before="page"
break-after="page">
<fo:table>
<!--Table content-->
</fo:table>
</fo:block-container>
然后,我应用FOP并从XSL-FO生成PDF。
Apache FOP合规性页面(http://xmlgraphics.apache.org/fop/compliance.html)表示,在fo:block-container
的情况下,FOP仅部分符合。有谁知道哪些属性不受支持或者这将如何影响生成的PDF?
答案 0 :(得分:1)
我真的不知道fop的合规性,但前段时间我使用了fop-extensions来旋转容器:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" version="2.0">
<fo:block-container position="absolute" fox:transform="rotate(90)">
...
</fo:block-container>
</xsl:stylesheet>
在下面的链接中找到有关fop扩展的更多信息。