Я попытался сгенерировать PDF из HTML, используя FOP. Моя проблема в цвете фона не работает для таблицы. Мой HTML-код
<table cols="100 100pt" border="1" width="100%" align="center">
<thead>
<tr>
<th style="background-color: blue"><span style="color: blue">col 1</span></th>
<th style="background-color: #ffffff">col 2</th>
</thead>
<tbody>
<tr>
<td style="background-color: #ffffff">value 1</td>
<td>Value 2</td>
</tr>
</tbody>
</table>
и мой код xsl
<xsl:template match="table">
<fo:table table-layout="fixed">
<xsl:choose>
<xsl:when test="@cols">
<xsl:call-template name="build-columns">
<xsl:with-param name="cols"
select="concat(@cols, ' ')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="200pt" />
</xsl:otherwise>
</xsl:choose>
<fo:table-body>
<xsl:apply-templates select="*" />
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="td">
<fo:table-cell>
<fo:block text-align="{$align}">
<xsl:apply-templates select="*|text()"/>
</fo:block>
</fo:table-cell>
</xsl:template>
Может кто-нибудь знает, как добавить фоновый цвет для таблицы в PDF?