I am trying to right align the table in my pdf document as follows, but it does not work. The table is still rendered to the left of the document.
Table detailsTable = new Table
{
ColumnWidths = “100 100 100 100 100 100”,
DefaultCellTextState = new TextState { FontSize = 10 },
DefaultCellPadding = new MarginInfo(2, 2, 2, 2),
Border = new BorderInfo(BorderSide.All, .5f, Color.Black),
HorizontalAlignment = HorizontalAlignment.Right,
};
I have tried following but to no avail.
detailsTable.Alignment = HorizontalAlignment.Right;
Is this a bug or there is another way to achieve right alignment?
Thanks