// ---------------------------------------------------------------------------
/**
* Create a table that can be used as a footer
* @param pagenumber the page that will use the table as footer
* @param total the total number of pages
* @return a tabel
*/
public PdfPTable CreateNavigationTable(int pagenumber, int total) {
PdfPTable table = new PdfPTable(4);
table.DefaultCell.Border = Rectangle.NO_BORDER;
table.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
Chunk first = new Chunk(((char)220).ToString(), SYMBOL);
first.SetAction(actions[0]);
table.AddCell(new Phrase(first));
Chunk previous = new Chunk(((char)172).ToString(), SYMBOL);
previous.SetAction(actions[pagenumber - 2 < 0 ? 0 : pagenumber - 2]);
table.AddCell(new Phrase(previous));
Chunk next = new Chunk(((char)174).ToString(), SYMBOL);
next.SetAction(actions[pagenumber >= total ? total - 1 : pagenumber]);
table.AddCell(new Phrase(next));
Chunk last = new Chunk(((char)222).ToString(), SYMBOL);
last.SetAction(actions[total - 1]);
table.AddCell(new Phrase(last));
table.TotalWidth = 120;
return table;
}