ImportedPageArea

ImportedPageArea

Forum member · Jan 27, 2011
Hi, I'm copying some content(source) through ImportedPageArea (which is header info)and adding to another report(destination) which will have 1...n number of pages dynmaically.Is there any way to add page number in this process dynamically on the report(destination).

Re: ImportedPageArea

Support · Jan 27, 2011
Hello, Yes, you can add page numbers to the final PDF document without any problem using our DynamicPDF Merger product. You will have to use PageNumberingLabel page element to do this. Please refer the documentation on PageNumberingLabel page element at: http://www.DynamicPDF.com/Support/NET_Help_Library_07_03/ceTe.DynamicPDF~ceTe.DynamicPDF.PageElements.PageNumberingLabel.html . Also below is the sample code for it. PdfDocument pdfdoc = new PdfDocument(@"C:\temp\Test.pdf"); ImportedPageArea pgarea = new ImportedPageArea(pdfdoc.Pages[0], 0, 100); MergeDocument document = new MergeDocument(); document.Append((@"C:\temp\Report.pdf"); document.Pages[0].Elements.Add(pgarea); //The below code is to add page numbers to the final PDF document. Template template = new Template(); PageNumberingLabel label = new PageNumberingLabel("%%CP%%of%%TP%%", 100, 500, 100, 20); template.Elements.Add(label); document.StampTemplate = template; document.Draw(@"C:\temp\DocumentC.pdf"); Thanks, ceTe Software Support Team.