We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue with footer and page content

Hi,


I have tried to put some space between the content of my page and my footer. But I couldn’t make it work. Could you please help me?

For the moment I’m using v6.2 of Aspose.pdf but I made my tests with 6.8 as well and I can’t find a way.
I tried with DistanceFromEdge because I found a post in the forum that say to use it, but it should be something else then.


Aspose.Pdf.Generator.Pdf pdfConv = new Aspose.Pdf.Generator.Pdf();
(new Aspose.Pdf.License()).SetLicense(“Aspose.Total.lic”);
Aspose.Pdf.Generator.Section sec1 = pdfConv.Sections.Add();

Aspose.Pdf.Generator.Table tab = new Aspose.Pdf.Generator.Table();
tab.ColumnWidths = “500”;
Aspose.Pdf.Generator.Row rowContent = tab.Rows.Add();
rowContent.Cells.Add(“aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa”);
sec1.Paragraphs.Add(tab);

Aspose.Pdf.Generator.HeaderFooter footer = new Aspose.Pdf.Generator.HeaderFooter(sec1);
sec1.OddFooter = footer;
//I don’t know why but when I change this it increases or decreases the distance between the footer and the page edge and not the page content
footer.DistanceFromEdge = 100;

Aspose.Pdf.Generator.Table tab1 = new Aspose.Pdf.Generator.Table();
footer.Paragraphs.Add(tab1);
tab1.DefaultCellBorder = new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.All, 0.1F);
tab1.ColumnWidths = “100 100”;

Aspose.Pdf.Generator.Row row1 = tab1.Rows.Add();
row1.Cells.Add(“Table in Footer Section”);
row1.BackgroundColor = new Aspose.Pdf.Generator.Color("#CCCCCC");

Aspose.Pdf.Generator.Row row2 = tab1.Rows.Add();
row2.Cells.Add(“example”);
row2.BackgroundColor = new Aspose.Pdf.Generator.Color("#FFFFCC");

pdfConv.Save(@“D:/AsposeSampleFooter.pdf”);
(new System.Diagnostics.Process { StartInfo = { FileName = @“D:/AsposeSampleFooter.pdf” } }).Start();

Hello Anouck,


Thanks for using our products.

Please note that all the objects inside PDF document are added in Flow layout (Top-Left to Bottom-Right) so if you need to add distance between page contents and Footer of the page, please try specifying top margin information for Footer object. Please try using footer.Margin.Top = 50; code line after footer.DistanceFromEdge = 100;. For your reference, I have also attached the resultant PDF document that I have generated using Aspose.Pdf for .Net 6.8.0. In case it does not satisfy your requirement or you have any further query, please feel free to contact. We apologize for your inconvenience.