table的iText 7.0.7方法是有效的:
Table table = new Table(new float [] {4,1,3,4,3,3,3,3,1});
table.setWidthPercent(100);
但在iText 7.1.2中找不到此方法:
table.setWidthPercent(100);
他们知道新的方法是什么,或者它已经移动到了哪里。
发布于 2018-08-09 16:49:18
请尝试
table.setWidth(UnitValue.createPercentValue(100)):
在iText 7.1.x中,许多维度属性被概括为包含一个UnitValue
实例,该实例既可以是绝对实例(以点为单位),也可以是相对实例(以百分比为单位)。
https://stackoverflow.com/questions/51754108
复制相似问题