how can insert a text in cell of a table right-aligned? It is possible?
Thanks for your help.
Thanks for your request. I think that you should use paragraph alignment to achieve this. For example see the following code.
// Create new document Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Set width of cell builder.CellFormat.Width = 200; // Set horizontal alignment builder.ParagraphFormat.Alignment = ParagraphAlignment.Right; // Insert cell builder.InsertCell(); // Insert text into the cell builder.Write("Some text"); builder.EndRow(); builder.EndTable(); // Save document doc.Save(@"Test095\out.doc");
Hope this helps.
but i dont use paragraphs.
Are there any alternative ways to insert text in cell of a table right-aligned.
Thanks for your help,
Anyway you use paragraphs if you inset text into the table cell. If cell contains some text then this cell has one or more child paragraphs. Please see the following link for more information.