0

I want to place cells vertically in table. Normally, it is placed as follows: https://imgur.com/a/EPTqobR

But I want to this: https://imgur.com/a/hrDz2aZ

That way, I'm gonna put 10 contents in the cells. Waiting for your helps.

PdfPTable table = new PdfPTable(2);
table.AddCell("content 1");
table.AddCell("content 2");
table.AddCell("content 3");
table.AddCell("content 4");
document.Add(table);
Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
Jcode
  • 15
  • 2
  • See [Horizontal text alignment in a PdfPCell](https://stackoverflow.com/q/18199344/719186) – LarsTech Jun 09 '19 at 23:52
  • Itext only offers to add table cells row-wise. If your data is arranged column-wise, you need to re-arrange it. If not otherwise possible, add your data to a 2-dimensional array at the correct position and thereafter add the data from that array row-by-row to the table. – mkl Jun 10 '19 at 10:23
  • Thanks @mkl I will add my data to a 2 dmiensional array. – Jcode Jun 10 '19 at 15:42

0 Answers0