Table "disappers" XSL-FO 到 PDF 转换期间
Table "disappers" during XSL-FO to PDF conversion
我在较大的 XSL-FO
文件的开头对 table 进行了以下标记:
<fo:table-and-caption xmlns:fo="http://www.w3.org/1999/XSL/Format" display-align="center">
<fo:table border="1px" border-collapse="separate" border-color="#000000" border-spacing="2px" border-style="outset" border-width="1px" role="table" text-align="center">
<fo:table-body end-indent="0pt" last-line-end-indent="0pt" role="tbody" start-indent="0pt" text-align="start" text-align-last="relative" text-indent="0pt">
<fo:table-row role="tr">
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Top Left</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Top Right</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row role="tr">
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Bottom Left</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Bottom Right</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
我的 问题中描述了总体设置。
当我们的应用程序使用 Apache POF
将其转换为 PDF 时,table“消失”。文件的其余部分似乎已正常转换。
上面的代码有没有问题?
参见http://xmlgraphics.apache.org/fop/compliance.html。 fo:table-and-caption
不受支持。这可能是您遇到问题的原因。
既然你没有标题,而且 FOP 也不支持它,为什么不省略 fo:table-and-caption
元素呢?
我在较大的 XSL-FO
文件的开头对 table 进行了以下标记:
<fo:table-and-caption xmlns:fo="http://www.w3.org/1999/XSL/Format" display-align="center">
<fo:table border="1px" border-collapse="separate" border-color="#000000" border-spacing="2px" border-style="outset" border-width="1px" role="table" text-align="center">
<fo:table-body end-indent="0pt" last-line-end-indent="0pt" role="tbody" start-indent="0pt" text-align="start" text-align-last="relative" text-indent="0pt">
<fo:table-row role="tr">
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Top Left</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Top Right</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row role="tr">
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Bottom Left</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell border="1px" border-style="inset" padding="1px" role="td">
<fo:block>
<fo:inline font-family="comic sans ms,sans-serif" font-size="medium" role="span">Bottom Right</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
我的
当我们的应用程序使用 Apache POF
将其转换为 PDF 时,table“消失”。文件的其余部分似乎已正常转换。
上面的代码有没有问题?
参见http://xmlgraphics.apache.org/fop/compliance.html。 fo:table-and-caption
不受支持。这可能是您遇到问题的原因。
既然你没有标题,而且 FOP 也不支持它,为什么不省略 fo:table-and-caption
元素呢?