How can I add page number to each of exported pages on PDF export?
One way of adding page numbering to a PDF document is with the following method.
private Infragistics.Documents.Report.Section.ISection AddTheMainSection(Infragistics.Documents.Report.Report report, bool continueWithPageNumbering){ Infragistics.Documents.Report.Section.ISection section = report.AddSection(); // Configure Section Properties. section.PageSize = Infragistics.Documents.Report.PageSizes.A4; section.PageMargins.All = 35; section.PageBorders = new Infragistics.Documents.Report.Borders(Infragistics.Documents.Graphics.Pens.Black, TABLE_CELL_PADDING); section.PagePaddings = new Infragistics.Documents.Report.Paddings(TABLE_CELL_PADDING); // Page Numbering. section.PageNumbering = new Infragistics.Documents.Report.Section.PageNumbering(); section.PageNumbering.Style = smallerBlueStyle; section.PageNumbering.Template = "Page [Page #] of [TotalPages]"; section.PageNumbering.Continue = continueWithPageNumbering; section.PageNumbering.SkipFirst = false; section.PageNumbering.Alignment = Infragistics.Documents.Report.PageNumberAlignment.Right; section.PageNumbering.OffsetX = -15; return section;
} // end helper AddTheMainSection()
There is also a help topic that discuss this subject, and shows code similar to the above.
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/DocumentEngine_Add_Page_Numbering.html
Sorry we removed that volume that link was made too. You can use the link here.
Link doesn't work
Hello ,
How I can call this method?