afficher les background-color
Bonjour.
Je tente de convertir du html en pdf.
pour ce faire je passe par Jtidy (html to xhtml), Xalan (xhtml to xsl-fo), et FOP (xsl-fo to pdf).
En théorie, je devrais obtenir le même visuel que le fichier html.
Hors les background color n'apparaissent pas.
Une idée?
voici mon code html de départ
Code:
1 2 3 4 5
| <html><body>é<br />Bonjour<br />
test<u> mise </u>en <em>forme</em> <br />
<hr />
<div style="text-align: center"><strong>TOTO et le</strong><span style="background-color: #ffff00"><strong> reste <br />
</strong></span><span style="color: #0000ff">du monde</span></div></body></html> |
Je joins également un extrait de mon xsl
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <xsl:template name="process-common-attributes">
<xsl:if test="@style">
<xsl:call-template name="process-style">
<xsl:with-param name="style" select="@style"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="process-style">
<xsl:param name="style"/>
<xsl:choose>
<xsl:when test="$name = 'background-color'">
<xsl:attribute name="background-color">
<xsl:value-of select="$value"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>
</xsl:template> |