Remove whitespace/blank spaces in table columns XSL-FO

笑着哭i 提交于 2019-12-20 07:14:46

问题


The link has a table in a PDF generated using Apache-FOP.

I am unable to remove the blank spaces/empty spaces in the table column headers and column values.

The PDF has limitation of 120 characters and thus unable to display all the text.

The application does supply the column width. But unsure how to use it in the xsl-fo file

Please suggest how to define widths of the table columns to hold only the text and without any blank/unused spaces.


回答1:


Use fo:table-column (see https://www.w3.org/TR/xsl11/#fo_table-column) and the column-width property to specify the width of each column. For example:

<fo:table-column column-width="100pt" column-number="1" />

If you generate the fo:table-column in sequence, then you can omit the column-number property (see https://www.w3.org/TR/xsl11/#column-number).

If you are using FOP, it still doesn't implement automatic table layout, so you probably also have to set the table width to be the sum of the column widths plus the border widths.



来源:https://stackoverflow.com/questions/16005263/remove-whitespace-blank-spaces-in-table-columns-xsl-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!