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

Free Support Forum - aspose.com

Page footer (Page numbers)

Dear Support,

I am using AppendDocument with ImportFormatMode.KeepSourceFormatting and it merging reports fine. But I have an issue that, while merging reports it updates the page numbers. Is there any way to stop this and keep the page numbers as is in the original documents.

Thank you,


Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I think you can use RestartPageNumbering. Please see the following code, for instance:

//Open Documents

Document dst = new Document(@"Test161\dst.doc");

Document src = new Document(@"Test161\src.doc");

//Set restart page numbering

src.FirstSection.PageSetup.RestartPageNumbering = true;

//Append document

dst.AppendDocument(src, ImportFormatMode.KeepSourceFormatting);

//Save document


Hope this helps.

Best regards.