Details
-
Bug
-
Status: Open
-
Resolution: Unresolved
-
2.5
-
None
-
None
-
Operating System: Linux
Platform: PC
-
42049
Description
RTF rendering of tables inside a block with a positive "margin-left" property
is exhibiting different behaviour than rendering of AWT/PS/&c. In particular,
in the RTF render, tables always seem to be left-aligned even if their parent
has a positive margin-left. However, the same tables are indented as one would
expect in the other render modes.
Consider this stylesheet (it will work with any XML file if you run fop -xml
any_file -xsl file_provided_below -rtf output_file.rtf
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- desc: reproduce problem where RTF table is rendered with incorrect -->
<!-- margin but PS/AWT versions rendered with correct margin. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<fo:region-body margin-left="0.26in" margin-right="0.25in"
margin-top="0.17in" margin-bottom="0.17in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block margin-left="0.8in" padding-left="0in" font-
family="arial" font-size="8pt">
<!-- a block indented by the margin, correctly. -->
<fo:block padding-bottom="10pt">Some correctly indented
text.</fo:block>
<!-- a table incorrectly indented. -->
<fo:table table-layout="fixed" padding-bottom="2.7pt">
<fo:table-column column-width="2in"/>
<fo:table-column column-width="2in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell margin-left="0in">
<fo:block>Should align with</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0in">
<fo:block>Text above</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>