I am using iTextSharp version 5.4.5.0.
I am trying to print PdfPTable with Multiple PdfPCell. The Number of PdfPCell will be dynamic. So How can I assign width to the dynamically generated PdfPCell ?
I know how to assign width to Static and Fixed number of Cell. But for Dynamic cell, how can I assign width to each of the dynamically generated Cells ? The Number of PdfPCell is not fixed.
Please help me ?
Thanks.
Even after some back and forth in comments to the original question, I am not entirely sure I understand the question correctly, but let's try:
So let us assume you do not know the number of columns beforehand but need to fetch the cells of the first row to get to know the number of columns and their widths. In that case you can simply do something like this: