How do I set column width of a table in iText?


The width of a table column defined relatively between each columns. On the following example we define an array floats that stores the column widths. We define the second column twice as bigger as the first column and the third column is three times bigger than the first column.

To set the width we call the table‘s setWidths() method. This method can accept an array of floats or an array of integers. Here is an example code:

Filed in: iText PDF

One Response to "How do I set column width of a table in iText?"

  1. john says:

    Hi, How can i wrap the cell contents of a particular cell?

Leave a Reply

Submit Comment

© 2014 Java Examples - Developed with