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

查看:27
本文介绍了删除表格列中的空格/空格 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(参见 https://www.w3.org/TR/xsl11/#fo_table-column) 和 column-width 属性指定每列的宽度.例如:

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 属性(请参阅https://www.w3.org/TR/xsl11/#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天全站免登陆