This project has moved. For the latest updates, please go here.

Showing page number in footer on right side

Aug 21, 2014 at 1:01 PM
Edited Aug 21, 2014 at 1:10 PM
I am trying to achieve the following.
  1. Show current data time in center in footer and page number on on right side on FIRST PAGE only.
  2. On other pages only show page number on right side. No date time is required.
I have added a table in footer and I can center align the date time but page number doesn't get aligned to right. It always stays left.

Plus another problem is when I use the following then it doesn't show any footer on first page.
Footer footer = doc.Footers.first
And if I use the following then displays it on all pages but as I explained I don't want to show date time on other pages.
Footer footer = doc.Footers.odd
Here's my complete code.

Footer footer = doc.Footers.odd; //If I change it to 'first' then it doesn't display footer on first page

Novacode.Table table = footer.InsertTable(1, 2);
table.AutoFit = AutoFit.Window;
table.Rows[0].Cells[0].Width = 260;
table.Rows[0].Cells[1].Width = 5;

Paragraph currentDateTime = table.Rows[0].Cells[0].InsertParagraph(System.DateTime.Today.ToString());
currentDateTime.Alignment = //This works

Paragraph pageNumber = table.Rows[0].Cells[1].InsertParagraph();
pageNumber.InsertPageNumber(PageNumberFormat.normal, 0);
pageNumber.Alignment = Alignment.right; //This doesn't work
Please help