FOP 0.18.1 - default text alignment is left - 1.37 Docbook - Norm Walsh style sheet PDF file viewed in Acrobat Reader and Ghostview. (1)Text align right attribute does not work in table cells. The text will align center in the cells but not right align. See xml source files and .fo output below. (2)Table column align does not work for alignment of text in table cells. See example tgroup below. XML source <table> <title>Test table 1</title> <tgroup cols="3"><colspec colname="col1" colwidth="2.0in"/><colspec colname="col2" colwidth="2.0in"/><colspec colname="col3" colwidth="2.0in"/><tbody><row> <entry colname="col1" colsep="1" rowsep="1" align="right">colwidth=2in</entry> <entry colname="col2" colsep="1" rowsep="1" align="left">colwidth=2in</entry> <entry colname="col3" colsep="1" rowsep="1" align="center">colwidth=2in</entry> </row><row> <entry colname="col1" colsep="1" rowsep="1" align="right">cell text align right</entry> <entry colname="col2" colsep="1" rowsep="1" align="left">cell text align left</entry> <entry colname="col3" colsep="1" rowsep="1" align="center">cell text align center</entry> </row></tbody></tgroup> </table> .fo output files <fo:table-and-caption id="N2544" keep-together.within-column="always" space- before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" space-after.minimum="0.5em" space-after.optimum="0.8em" space- after.maximum="1.0em"> <fo:table-caption> <fo:block font-weight="bold" keep-with-next.within-column="always" hyphenate="false">Test table 1</fo:block> </fo:table-caption> <fo:table space-before.minimum="0.5em" space-before.optimum=".8em" space- before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em"> <fo:table-column column-number="1" column-width="2.0in"/> <fo:table-column column-number="2" column-width="2.0in"/> <fo:table-column column-number="3" column-width="2.0in"/> <fo:table-body border-left="0.5pt solid red " padding-left="0pt" border- right="0.5pt solid red " padding-right="0pt" border-top="0.5pt solid red " padding-top="0pt" border-bottom="0.5pt solid red " padding-bottom="0pt"> <fo:table-row> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text- align="right">colwidth=2in</fo:block> </fo:table-cell> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text- align="left">colwidth=2in</fo:block> </fo:table-cell> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text- align="center">colwidth=2in</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text-align="right">cell text align right</fo:block> </fo:table-cell> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text-align="left">cell text align left</fo:block> </fo:table-cell> <fo:table-cell border-right="0.5pt solid red " padding-right="0pt" border- bottom="0.5pt solid red " padding-bottom="0pt"> <fo:block start-indent="5pt" end-indent="5pt" text-align="center">cell text align center</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:table-and-caption> Also text alignment attribute for table-column does not follow through and align the table cells text. XML source - example tgroup <tgroup cols="3"><colspec colname="col1" colwidth="2.0in" align="right"/> <colspec colname="col2" colwidth="2.0in" align="left"/><colspec colname="col3" colwidth="2.0in" align="center"/>
left and right are not legal values for the text-align property. Use "start" and "end". After this change, the FO works in current CVS. Also the table-and-caption FO isn't yet implemented.
*** Bug 1723 has been marked as a duplicate of this bug. ***
See 5.4.3 of the XSL FO spec: 5.4.3 Text-align Property A value of "left", or "right" is converted to the writing-mode relative value as specified in the property definition.
I forgot to add this warning message I also get when I process the file. WARNING: Unknown enumerated value for property 'text-align': left Error in text-align property value 'left': org.apache.fop.fo.expr.PropertyException: No conversion defined
The keywords left and right now (CVS 0.20.1+) work for text-align (on any block FO). Concerning the second issue, there is no direct inheritance from table-columns. You must use the from-table-column function (XSL 5.10.4), but that doesn't yet work in FOP.
Well, "left" and "right" values of text-align work, I believe I can close the bug.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed