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

Free Support Forum - aspose.com

Aspose Words Footer Page Numbering

Hello Aspose team.
Issue 1:Generated pdf report has wrong page numbering.
Issue 2:To remove unexpected blank pages I am using the code(the section is unknown, has a lot of subreports):
foreach (Section section in docMainTemlate.Sections)
{
section.PageSetup.SectionStart = SectionStart.Continuous;
}
that will follow to combine few pages to one page.
Simple example in attachment.

Hi Victor,


Thanks for your inquiry. I am checking with these scenarios and will get back to you soon.

Best regards,

Hi Victor.


Thank you for being patient. The resultant PDF document (i.e. produced on my side by using the code you attached in your first post) has four pages. There are no blank pages in this PDF because the foreach loop code under “Issue 2” heading removes the blank pages. The final page numbering shown on each page is as follows:

Page1 displays: Page 1 of 6
Page2 displays: Page 5 of 5
Page3 displays: Page 1 of 4
Page4 displays: Page 2 of 2

The numbering above definitely seems out of order; but, could you please share your desired numbering per each page. To fully understand your scenario, please attach the following resources for further testing.

1) Generate your target Word document which shows the desired numbering by using Microsoft Word application and attach it.
2) “Save As” your target Word document you produced above in PDF format by using Microsoft Word and attach it.

I will investigate the structure of your target Word/PDF documents as to how you would like the numbering on each page be appeared and provide you code to achieve the same using Aspose.Words. I apologize once again for the wait.

Best regards,