Posted by a ceTe Software moderator
Hello Chandan,
Please try setting the Splittable property of the Cell2 object to true and see it resolves the issue for you.
Here is a code sample:
Document document = new Document();
Table2 table = new Table2(0, 0, 200, 600);
table.Columns.Add(100);
table.Columns.Add(100);
string dynamicText = @"This is to test :: ";
for (int i = 0; i < 10; i++)
{
dynamicText += dynamicText;
}
Row2 row1 = table.Rows.Add(20);
Cell2 cell1=row1.Cells.Add(dynamicText);
cell1.Splittable = true;
row1.Cells.Add("Item1");
//Add other rows to table
for (int i = 1; i <= 5; i++)
{
Row2 row = table.Rows.Add(20);
row.Cells.Add("Row #" + i);
row.Cells.Add("Item");
}
do
{
Page page = new Page(PageSize.Letter, PageOrientation.Portrait, 50);
document.Pages.Add(page);
page.Elements.Add(table);
table = table.GetOverflowRows();
} while (table != null);
// Save the PDF
string pdfFilePath = @"C:\Temp\MyDocument.pdf";
document.Draw(pdfFilePath);
Thanks,
ceTe Software Support Team