I use Java with iText to create some PDF files. I need to put text in columns, so I'm trying to use PdfPTable. I create it with:
myTable = new PdfPTable(n);
n is the number of columns. The problem is that PdfPTable fills the table row by row, that is, you first indicate the cell in column 1 of row 1, then in column 2 of row 1, etc., but I need to do this column by column, because this is how the data is transmitted to me.
I would use Table (which allows you to specify the position), as in http://stderr.org/doc/libitext-java-doc/www/tutorial/ch05.html , but I get the message "can not allow type", and mine Eclipse cannot find the correct import.
Edit: in case my previous explanation is confusing, I want to populate the table in the following order:
1 3 5 2 4 6
Instead of this:
1 2 3 4 5 6
user2061099
source share