I have the code below which sets a footer to the pdf document.
But The problem is that the footer only apprears in the first page.
private static void AddTable3()
{
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
Aspose.Pdf.Table table = GetTable();
for (int row_count = 1; row_count < 100; row_count++)
{
// add row to table
Aspose.Pdf.Row row = table.Rows.Add();
// add table cells
row.Cells.Add("Column (" + row_count + ", 1)");
row.Cells.Add("Column (" + row_count + ", 2)");
row.Cells.Add("Column (" + row_count + ", 3)");
}
Aspose.Pdf.Table table2 = GetTable();
for (int row_count = 1; row_count < 100; row_count++)
{
// add row to table
Aspose.Pdf.Row row = table.Rows.Add();
// add table cells
row.Cells.Add("Column NEW (" + row_count + ", 1)");
row.Cells.Add("Column NEW (" + row_count + ", 2)");
row.Cells.Add("Column (" + row_count + ", 3)");
}
doc.PageInfo.IsLandscape = true;
doc.Pages.Add();
doc.Pages[1].Paragraphs.Add(table);
doc.PageInfo.IsLandscape = true;
TextStamp textStamp = new TextStamp("Footer text");
// set properties of the stamp
textStamp.BottomMargin = 10;
textStamp.HorizontalAlignment = HorizontalAlignment.Center;
textStamp.VerticalAlignment = VerticalAlignment.Bottom;
// add footer on all pages
foreach (Page page in doc.Pages)
{
page.AddStamp(textStamp);
}
// Save updated document containing table object
doc.Save("C:\\temp\\A_FooterTest1.pdf");
}