FOP Code for pdf generation: table cells are rendered weird -
i use fop code generate .pdf files. need dynamically generate table based on user input. in cms <table>
, <tr>
, <td>
are defined following:
td:
<fo:table-cell padding-top="0pt" padding-left="5.4pt" padding-bottom="0pt" padding-right="5.4pt" border-left-style="solid" border-right-style="solid" border-left-color="$cms_value(bordercolor)$" border-right-color="$cms_value(bordercolor)$" border-left-width="0.0pt" border-right-width="0.0pt" border-top-style="solid" border-bottom-style="solid" border-top-color="$cms_value(bordercolor)$" border-bottom-color="$cms_value(bordercolor)$" border-top-width="0.0pt" border-bottom-width="0.0pt"> <fo:block font-family="$cms_value(mainfontfamily)$" color="$cms_value(mainfontcolor)$" font-size="$cms_value(fontsize)$pt" language="de" text-align="left"> <fo:inline font-weight="normal" font-size="$cms_value(fontsize)$pt"> <fo:leader leader-length="0pt"/> $cms_value(#content)$ </fo:inline> </fo:block> </fo:table-cell>
table:
<fo:table table-layout="fixed" font-family="$cms_value(mainfontfamily)$" color="$cms_value(mainfontcolor)$" start-indent="0pt" border-style="solid" border-top-color="$cms_value(bordercolor)$" border-top-width="0.0pt" border-left-color="$cms_value(bordercolor)$" border-left-width="0.0pt" border-bottom-color="$cms_value(bordercolor)$" border-bottom-width="0.0pt" border-right color="$cms_value(bordercolor)$" border-right-width="0.0pt"> $cms_for(col,[1..#table.cols])$ <fo:table-column column-number="$cms_value(col)$" column-width="$cms_value(100.0/#table.cols)$%"/> $cms_end_for$ <fo:table-body start-indent="0pt" end-indent="0pt"> $cms_value(#content)$ </fo:table-body> </fo:table>
tr:
<fo:table-row> $cms_value(#content)$ </fo:table-row>
this results in table weirdly formatted (see attached image). added red borders around table cell make more clear. big cell in middle 1 cell , should not have huge gap within text after 3rd row (i typed in dummy text...).
why happen , how can fix it?
i played around <fo:leader/>
, <line-height>
, other stuff, nothing of seem cause of "split up" cells.
thanks!
Comments
Post a Comment