在iTextSharp中设置表格的高度 [英] Setting height for table in iTextSharp

查看:157
本文介绍了在iTextSharp中设置表格的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个包含2列的表格。在第一行的第二个单元格中,我想插入另一个只有一个单元格的表格。问题是我无法设置第二个表的高度。它的内容高度超过了内容。它的高度与添加它的单元格高度相等。

I've created a table with 2 columns. In the second cell of the first row I want to insert another table that have only one cell. The problem is that I can't set the height of the second table. It stretches more than the content height. Its height is equal with the cell height where it was added.

推荐答案

表的高度无法设置,高度为表由其单元格的高度决定(您可以设置单元格的高度属性)。如果要拉伸此表,可以在第二个表中添加一个空单元格。

The height of the table cannot be set, the height of the table is determined by the height of its cells (you can set the height-property of a cell). You could add an empty cell to the second table if you want to stretch this table.

这篇关于在iTextSharp中设置表格的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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