Hi Team,
Does dynamic pdf has word wrap feature,for cells in Table?,is Autoleading property used for that?.If not could you please tell me how to auto wrap text in side table cell?.Thanks in advance.
Best Regards,
B.AShly
Is there a word wrap feature,for cells in Table?
Re: Is there a word wrap feature,for cells in Table?
Support · Jan 19, 2012Hello Ashly,
The text in the cell of the Table by default will be wrapped. Also you can set auto leading to the cell text using AutoLeading property of the Cell class and if you would like set custom leading then you can use Leading property of Cell class. Below is the sample code for it.
Document document = new Document();
Page page = new Page();
Table table = new Table(10, 100, 300, 400);
table.Columns.Add(100);
table.Columns.Add(100);
Row row1 = table.Rows.Add(10);
string text = "This is to test example to wrap the text in the cell";
Cell cell = row1.Cells.Add(text);
cell.Font = Font.Helvetica;
//cell.AutoLeading = true;
cell.Leading = 20;
Cell cell2 = row1.Cells.Add(text);
cell2.Font = Font.Helvetica;
page.Elements.Add(table);
document.Pages.Add(page);
document.Draw(@"C:\TestTable.pdf");
Thanks,
ceTe Software Support Team.
Re: Is there a word wrap feature,for cells in Table?
Forum member · Jan 19, 2012Great!.Thanks for your reply.