J
james
Hi there,
I'm using the FOP from xml.apache.org/fop tool to convert from HTML
to PDF.
I'm reading the height and valign attributes of a column-cell (TD) in
the XSL
file:
<!-- HTML table tag <td> -->
<xsl:template match="td">
<fo:table-cell xsl:use-attribute-sets="table.data.td">
<xsl:if test="@valign">
<xsl:attribute name="display-align">
<xsl:value-of select="@valign"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@height">
<xsl:attribute name="height">
<xsl:value-of select="concat(@height,'px')"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@class='smalltextwb'">
<xsl:attribute name="font-family">Verdana, Arial, Helvetica,
sans-serif</xsl:attribute>
<xsl:attribute name="font-size">10px</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
<xsl:attribute name="color">#FFFFFF</xsl:attribute>
</xsl:if>
<fo:block>
<xsl:if test="@align">
<xsl:attribute name="text-align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
</xsl:template>
When the pdf is generated, the valign doesnt work when the height is
mentioned
on the HTML:
<td height="100" valign="center"> --> Doesnt work
<td valign="center"> --> works
Does anyone has any idea why the height property prevents the aligning
of the column cell on the PDF?
Any help will be great,
James
I'm using the FOP from xml.apache.org/fop tool to convert from HTML
to PDF.
I'm reading the height and valign attributes of a column-cell (TD) in
the XSL
file:
<!-- HTML table tag <td> -->
<xsl:template match="td">
<fo:table-cell xsl:use-attribute-sets="table.data.td">
<xsl:if test="@valign">
<xsl:attribute name="display-align">
<xsl:value-of select="@valign"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@height">
<xsl:attribute name="height">
<xsl:value-of select="concat(@height,'px')"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@class='smalltextwb'">
<xsl:attribute name="font-family">Verdana, Arial, Helvetica,
sans-serif</xsl:attribute>
<xsl:attribute name="font-size">10px</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
<xsl:attribute name="color">#FFFFFF</xsl:attribute>
</xsl:if>
<fo:block>
<xsl:if test="@align">
<xsl:attribute name="text-align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
</xsl:template>
When the pdf is generated, the valign doesnt work when the height is
mentioned
on the HTML:
<td height="100" valign="center"> --> Doesnt work
<td valign="center"> --> works
Does anyone has any idea why the height property prevents the aligning
of the column cell on the PDF?
Any help will be great,
James