0

In java itext5 there is function table.setWidths() hence we can modify column widths on fly. In itext7 table.setWidths() is not there and new Table(colwidths) have to pass in constructor this is fixed and cannot modyify on fly.Please let me know the procedure to modify table widths like itext5.

Itext5
Table table = new Table(3);
float[] widths=new float[3.0,4.0,5.0];
table.setWidths(widths);

what is the above code itext7?

ramarao
  • 1
  • 1
  • You can always create a new table if you need to set different column widths – Alexey Subach May 23 '20 at 14:10
  • I can create new table.But widths i got based on string width after navigating all rows.I need to set widths in existing table or i have to copy data from one table to another new table. – ramarao May 25 '20 at 14:19
  • You can save your cells into a temporary data structure, do all the necessary calculations and then create a table based on that data – Alexey Subach May 25 '20 at 15:03

0 Answers0