Reputation: 51
There is a iText 7.0.7 method of table that works:
Table table = new Table(new float [] {4,1,3,4,3,3,3,3,1});
table.setWidthPercent(100);
But in iText 7.1.2 this method is not found:
table.setWidthPercent(100);
They know what the new method is or where it has moved, please.
Upvotes: 5
Views: 5387
Reputation: 95898
Please try
table.setWidth(UnitValue.createPercentValue(100)):
In iText 7.1.x many dimension properties have been generalized to contain a UnitValue
instance which can be either absolute (in points) or relative (in percent).
Upvotes: 11