I defined new MigraDoc document m_Doc and added section:
Section sec = m_Doc.AddSection();
Then I created the footer and appropriate paragraph:
HeaderFooter footer = sec.Footers.Primary;
Paragraph footerPara = new Paragraph();
Then I defined paragraph format:
ParagraphFormat pf = new ParagraphFormat(); and set the alignment to:
ParagraphAlignment.Right;
Page definition is:
PdfPage page = docRender.PdfDocument.Pages[0];
page.Size = PageSize.Letter;
While using page.Orientation = PageOrientation.Portrait and
XRect rect = new XRect(new XPoint(0, 0), new XSize(page.Width.Point, (page.Height.Point - 30)));
my footer was aligned to the right, but when I changed to page.Orientation = PageOrientation.Landscape; my ParagraphAlignment.Right; was around the centre.
What would be the proper solution to align to the right for landscape?
|