删除表列XSL-FO中的空格/空白 [英] Remove whitespace/blank spaces in table columns XSL-FO

查看:152
本文介绍了删除表列XSL-FO中的空格/空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该链接在使用Apache-FOP生成的PDF中有一个表格.

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.

PDF的字符数限制为120个,因此无法显示所有文本.

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

应用程序确实提供了列宽.但是不确定如何在xsl-fo文件中使用它

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.

推荐答案

使用fo:table-column(请参阅

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" />

如果按顺序生成fo:table-column,则可以省略column-number属性(请参见

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).

如果您使用的是FOP,它仍然无法实现自动表格布局,因此您可能还必须将表格宽度设置为列宽加上边框宽度的总和.

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.

这篇关于删除表列XSL-FO中的空格/空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆