Itextsharp text alignment horizontal
I am using this code to align horizontally.
cell = New PdfPCell()
p = New Phrase("value")
cell.AddElement(p)
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER //Tried with
Element.Align_Center Also. Tried Adding this line before adding
element also.
table.AddCell(cell)
Its not working.
I am creating a table with 5 columns in it and adding cell dynamically in
runtime in a for loop with above code. I want all cells content to be
aligned center.. any help would be great!
No comments:
Post a Comment