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

Free Support Forum - aspose.com

Can not left align my footer

Hi,

I am trying to position the footer to the left of my PDF but was not able to do so. I tried using the margin and DistanceFromEdge property but still didn't work. Please help.

Below is my code:

//add a footer object

Aspose.Pdf.TextInfo FooterInfo = new Aspose.Pdf.TextInfo();

FooterInfo.Alignment = AlignmentType.Left;

FooterInfo.FontSize = 9;

HeaderFooter header = new HeaderFooter();

header.IsFirstPageOnly = false;

header.TextInfo = FooterInfo;

header.Margin.Left = 5;

header.IsLastPageOnly = false;

header.DistanceFromEdge = 2;

secLogo.OddFooter = secLogo.EvenFooter = header;

string strFooter = "This is my footer text";

Text txtFooter = new Aspose.Pdf.Text (header,strFooter);

header.Paragraphs.Add(txtFooter);

Hi,

If you set header.Margin.Left = 0 then the footer wil be touching the left margin of the page. If you also set the secLogo.PageInfo.Margin.Left = 0 then the footer will touch the left edge of the page. For more infromation please consult the image in http://www.aspose.com/wiki/default.aspx/Aspose.Pdf/SetPageHeaderAndFooter.html

Thanks.